[log] suppress NOTE level logs to avoid log spam in user build (#11507)

This commit is contained in:
Rongli Sun
2025-05-26 17:07:29 -07:00
committed by GitHub
parent fb4ca09759
commit 8c70c780c8
3 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -750,7 +750,7 @@ void Ip6::UpdateReassemblyList(void)
{
if (now - message.GetTimestamp() >= TimeMilli::SecToMsec(kReassemblyTimeout))
{
LogNote("Reassembly timeout.");
LogInfo("Reassembly timeout.");
SendIcmpError(message, Icmp::Header::kTypeTimeExceeded, Icmp::Header::kCodeFragmReasTimeEx);
mReassemblyList.DequeueAndFree(message);
@@ -1150,7 +1150,7 @@ void Ip6::DetermineAction(const Message &aMessage,
if (Get<NetworkData::Leader>().RouteLookup(aHeader.GetSource(), aHeader.GetDestination(), rloc16) != kErrorNone)
{
// No route in mesh, forward to host (as a last resort).
LogNote("Failed to find valid route for: %s", aHeader.GetDestination().ToString().AsCString());
LogInfo("Failed to find valid route for: %s", aHeader.GetDestination().ToString().AsCString());
aForwardHost = true;
ExitNow();
}
@@ -1275,7 +1275,7 @@ Error Ip6::HandleDatagram(OwnedPtr<Message> aMessagePtr, bool aIsReassembled)
if (udpHeader.GetDestinationPort() == Tmf::kUdpPort)
{
LogNote("Dropping TMF message from untrusted origin");
LogInfo("Dropping TMF message from untrusted origin");
ExitNow(error = kErrorDrop);
}
}
+4 -4
View File
@@ -1886,7 +1886,7 @@ void MeshForwarder::LogMessage(MessageAction aAction,
#if (OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE > 0)
case kMessageFullQueueDrop:
#endif
logLevel = kLogLevelNote;
// default kLogLevelInfo for dropped message
break;
}
@@ -1916,7 +1916,7 @@ void MeshForwarder::LogFrame(const char *aActionText, const Mac::Frame &aFrame,
{
if (aError != kErrorNone)
{
LogNote("%s, aError:%s, %s", aActionText, ErrorToString(aError), aFrame.ToInfoString().AsCString());
LogInfo("%s, aError:%s, %s", aActionText, ErrorToString(aError), aFrame.ToInfoString().AsCString());
}
else
{
@@ -1928,14 +1928,14 @@ void MeshForwarder::LogFragmentFrameDrop(Error aError,
const RxInfo &aRxInfo,
const Lowpan::FragmentHeader &aFragmentHeader)
{
LogNote("Dropping rx frag frame, error:%s, %s, tag:%d, offset:%d, dglen:%d", ErrorToString(aError),
LogInfo("Dropping rx frag frame, error:%s, %s, tag:%d, offset:%d, dglen:%d", ErrorToString(aError),
aRxInfo.ToString().AsCString(), aFragmentHeader.GetDatagramTag(), aFragmentHeader.GetDatagramOffset(),
aFragmentHeader.GetDatagramSize());
}
void MeshForwarder::LogLowpanHcFrameDrop(Error aError, const RxInfo &aRxInfo)
{
LogNote("Dropping rx lowpan HC frame, error:%s, %s", ErrorToString(aError), aRxInfo.ToString().AsCString());
LogInfo("Dropping rx lowpan HC frame, error:%s, %s", ErrorToString(aError), aRxInfo.ToString().AsCString());
}
MeshForwarder::RxInfo::InfoString MeshForwarder::RxInfo::ToString(void) const
+1 -1
View File
@@ -832,7 +832,7 @@ void MeshForwarder::GetForwardFramePriority(RxInfo &aRxInfo, Message::Priority &
exit:
if (error != kErrorNone)
{
LogNote("Failed to get forwarded frame priority, error:%s, %s", ErrorToString(error),
LogInfo("Failed to get forwarded frame priority, error:%s, %s", ErrorToString(error),
aRxInfo.ToString().AsCString());
}
else if (isFragment)