Syntax
class Logger
{
public:
static void LogInModule(const char *aModuleName, LogLevel aLogLevel, const char *aFormat, ...)
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(3, 4);
template <LogLevel kLogLevel>
static void LogAtLevel(const char *aModuleName, const char *aFormat, ...)
OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK(2, 3);
static void LogVarArgs(const char *aModuleName, LogLevel aLogLevel, const char *aFormat, va_list aArgs);
#if OT_SHOULD_LOG_AT(OT_LOG_LEVEL_WARN)
static void LogOnError(const char *aModuleName, Error aError, const char *aText);
#endif
#if OPENTHREAD_CONFIG_LOG_PKT_DUMP
static constexpr uint8_t kStringLineLength = 80;
static constexpr uint8_t kDumpBytesPerLine = 16;
template <LogLevel kLogLevel, const char *kModuleName>
static void Dump(const char *aText, const void *aData, uint16_t aDataLength)
{
DumpAtLevel<kLogLevel>(kModuleName, aText, aData, aDataLength);
}
static void DumpInModule(const char *aModuleName,
LogLevel aLogLevel,
const char *aText,
const void *aData,
uint16_t aDataLength);
template <LogLevel kLogLevel>
static void DumpAtLevel(const char *aModuleName, const char *aText, const void *aData, uint16_t aDataLength);
#endif
};
Fields
Methods
LogInModule()
LogAtLevel()
LogVarArgs()
LogOnError()
Dump()
DumpInModule()
DumpAtLevel()
Dump
![]()
class Logger![]()
LogInfo("Schedule tx for one cycle");![]()
LogNote("Leader MLR Timeout is normalized from %lu to %lu", ToUlong(origTimeout),![]()
LogInfo("Send %s for %s (rloc16=%04x): %s", proactive ? "PRO_BB.ntf" : "BB.ans", aDua.ToString().AsCString(),![]()
LogInfo("HandleExtendedBackboneAnswer: target=%s, mliid=%s, LTT=%lus, rloc16=%04x", aDua.ToString().AsCString(),![]()
LogInfo("HandleProactiveBackboneNotification: %s, target=%s, mliid=%s, LTT=%lus", ErrorToString(error),![]()
LogInfo("Sent to commissioner on ProxyRx (c/ur)");![]()
LogInfo("Sent to commissioner on RelayRx (c/rx)");![]()
LogInfo("Sent to joiner router request on RelayTx (c/tx)");![]()
LogWarnOnError(error, "send to joiner router request RelayTx (c/tx)");![]()
LogWarnOnError(error, "send Active/Pending/CommissionerGet response");![]()
LogInfo("SecureSession connected");![]()
LogInfo("SecureSession disconnected");![]()
LogInfo("Ephemeral key timed out");![]()
LogInfo("Removing ephemeral key and restarting agent");![]()
LogInfo("Reached max allowed connection attempts with ephemeral key");![]()
LogInfo("Starting Child Supervision");![]()
LogInfo("Stopping Child Supervision");![]()
LogDebg("Failed to parse CoAP header");![]()
LogInfo("Bus TX Time: %lu usec, Latency: %lu usec. Calculated CSL Frame Request Ahead: %lu usec",![]()
LogInfo("Rx data poll, src:0x%04x, qed_msgs:%d, rss:%d, ack-fp:%d", child->GetRloc16(), indirectMsgCount,![]()
LogWarn("Data poll tx requested while data polling was not enabled!");![]()
LogCrit("Failed to set PAN channel to %u when applying dataset: %s", channel, ErrorToString(error));![]()
LogInfo("Sent dataset set request to leader");![]()
LogInfo("sent dataset get request");![]()
LogInfo("Pending delay timer expired");![]()
LogInfo("sent dataset set/replace response");![]()
LogInfo("Generated local dataset");![]()
LogWarn("Insufficient memory for new DHCP prefix");![]()
LogWarn("DNS query over TCP not supported.");![]()
LogInfo("Send response, rcode:%u", rcode);![]()
LogDebg("Failed to allocate a new message");![]()
LogWarn("Failed to clone mcast message for indirect tx to sleepy children");![]()
LogNote("Dropping TMF message from untrusted origin");![]()
LogInfo("JoinerRouter::HandleUdpReceive");![]()
LogCert("[THCI] direction=send | type=JOIN_ENT.ntf");![]()
LogCert("[THCI] direction=recv | type=JOIN_ENT.rsp");![]()
LogNote("Key Rotation Time in SecurityPolicy is set to min allowed value of %u", newPolicy.mRotationTime);![]()
template <LogLevel kLogLevel> void Logger::LogAtLevel(const char *aModuleName, const char *aFormat, ...)![]()
void Logger::DumpAtLevel(const char *aModuleName, const char *aText, const void *aData, uint16_t aDataLength)![]()
LogDebg("Idle mode: Radio sleeping");![]()
LogDebg("Rx security - Ack frame counter %lu", ToUlong(frameCounter));![]()
LogInfo("Frame tx attempt failed, error: Enh-ACK security check fail");![]()
LogInfo("Received Beacon Request");![]()
LogInfo("Frame tx failed, error:%s, %s", ErrorToString(aError), aFrame.ToInfoString().AsCString());![]()
LogDebg("Timestamp=%lu Sequence=%u CslPeriod=%u CslPhase=%u TransmitPhase=%u",![]()
LogNote("Child ID Request requires fragmentation, aborting tx");![]()
LogInfo("Deferred ack timeout on trel for neighbor %s rloc16:0x%04x",![]()
LogInfo("No available message buffer");![]()
LogWarn("Invalid settings - no saved parent info with valid end-device RLOC16 0x%04x",![]()
LogDebg("Store Network Information");![]()
LogWarn("Channel %u is not in the supported channel mask %s, detach the network gracefully!",![]()
LogInfo("Requesting shorter `Child ID Request`");![]()
LogInfo("Already attached to candidate parent");![]()
LogWarn("No valid parent when sending Child Update Request");![]()
LogNote("Delay processing Announce - channel %d, panid 0x%02x", channel, panId);![]()
LogNote("Processing Announce - channel %d, panid 0x%02x", newChannel, newPanId);![]()
LogInfo("Attempt to become router");![]()
LogInfo("No longer router eligible");![]()
LogWarn("Failed to get context %u for compressed address from child 0x%04x", contextId,![]()
LogInfo("Suppressing Data Response - waiting for new network data");![]()
LogInfo("Rejecting BR %s router role req - have %u BR routers", extAddress.ToString().AsCString(),![]()
LogDebg("MlrManager::UpdateReregistrationDelay: rereg=%d, needSendMlr=%d, ReregDelay=%lu", aRereg, needSendMlr,![]()
LogDebg("-------- Multicast Addresses --------");![]()
LogDebg("NdProxyTable::FindInvalid() => %s", found ? "OK" : "NOT_FOUND");![]()
LogInfo("Allocated Service ID = %d", serviceId);![]()
LogInfo("Timed out waiting for netdata on restoring leader role after reset");![]()
LogInfo("Requesting router role as BR");![]()
LogInfo("Publishing DNS/SRP service unicast (ml-eid, port:%d)", aPort);![]()
LogInfo("Unpublishing DNS/SRP service");![]()
LogNote("Allocate router id %d", aRouterId);![]()
LogNote("No valid /48 BR ULA prefix found in settings, generating new one");![]()
LogCrit("Failed to generate random /48 BR ULA prefix");![]()
LogInfo("Evaluating routing policy");![]()
LogInfo("Will evaluate routing policy immediately");![]()
LogInfo("Will evaluate routing policy in %s (%lu msec)", string.AsCString() + 3, ToUlong(duration));![]()
DumpDebg("[BR-CERT] direction=send | type=RA |", packet.GetBytes(), packet.GetLength());![]()
LogInfo("Send ICMP unreachable for fwd msg with local ULA src and non-local dst");![]()
LogWarn("Discovered too many prefixes, ignore default route from RA header");![]()
LogInfo("- PIO %s - ignore since not a valid on-link prefix", prefix.ToString().AsCString());![]()
LogWarn("Discovered too many prefixes, ignore on-link prefix %s", prefix.ToString().AsCString());![]()
LogWarn("Discovered too many prefixes, ignore route prefix %s", prefix.ToString().AsCString());![]()
LogInfo("Received NA from router %s", router->mAddress.ToString().AsCString());![]()
LogInfo("Sent Neighbor Solicitation to %s - attempt:%u/%u", aRouter.mAddress.ToString().AsCString(),![]()
LogInfo("No favored OMR prefix found in Thread network.");![]()
LogInfo("Restored old prefix %s, lifetime:%lu", entry->mPrefix.ToString().AsCString(), ToUlong(lifetime));![]()
LogInfo("User cleared explicitly set RIO Preference");![]()
LogInfo("User cleared explicitly set published route preference - set based on role");![]()
LogInfo("Starting Nat64PrefixManager");![]()
LogInfo("Stopping Nat64PrefixManager");![]()
LogInfo("Evaluating NAT64 prefix");![]()
LogInfo("Discovering infraif NAT64 prefix");![]()
LogInfo("RsSender: Starting - will send first RS in %lu msec", ToUlong(delay));![]()
LogInfo("RsSender: Finished sending RS msgs and waiting for RAs");![]()
LogDebg("HandleMbedtlsTransmit DTLS");![]()
LogDebg("HandleMbedtlsReceive DTLS");![]()
LogInfo("%s NetworkInfo {rloc:0x%04x, extaddr:%s, role:%s, mode:0x%02x, version:%u, keyseq:0x%lx, ...",![]()
LogInfo("Generated and saved secret key");![]()
LogInfo("HostInfo enabled auto address");![]()
LogInfo("Msg len %lu is larger than MTU, enabling single service mode", ToUlong(length));![]()
LogInfo("Test mode - appending short variant of Lease Option");![]()
LogInfo("SRP update handler is notified (updatedId = %lu)", ToUlong(updateId));![]()
LogInfo("Delayed SRP host update result, the SRP update has been committed (updateId = %lu)", ToUlong(aId));![]()
LogInfo("Drop duplicated SRP update request: MessageId=%u", aMetadata.mDnsHeader.GetMessageId());![]()
LogInfo("Processed SRP update info");![]()
LogInfo(" %d host address(es):", numAddrs);![]()
LogInfo("Send success response with granted lease: %lu and key lease: %lu", ToUlong(aLease), ToUlong(aKeyLease));![]()
LogInfo("SRP update handler is notified (updatedId = %lu)", ToUlong(updateId));![]()
LogInfo("Enabled interface, local port:%u", mUdpPort);![]()
LogDebg("Disabled interface");![]()
LogDebg("Extended Address changed, re-registering DNS-SD service");![]()
LogDebg("Extended PAN ID changed, re-registering DNS-SD service");![]()
LogInfo("Registering DNS-SD service: port:%u, txt:\"%s=%s, %s=%s\"", mUdpPort, kTxtRecordExtAddressKey,![]()
LogDebg("HandleReceived(aLength:%u)", aLength);![]()
LogInfo("%s peer mac:%s, xpan:%s, %s", aAction, GetExtAddress().ToString().AsCString(),![]()
LogDebg("BeginTransmit() [%s] plen:%d", txPacket.GetHeader().ToString().AsCString(), txPacket.GetPayloadLength());![]()
LogDebg("ReceivedPacket() [%s] plen:%d", aPacket.GetHeader().ToString().AsCString(), aPacket.GetPayloadLength());![]()
LogDebg("HandleAck() [%s]", aAckPacket.GetHeader().ToString().AsCString());![]()
LogDebg("SendAck [%s]", ackPacket.GetHeader().ToString().AsCString());![]()
LogDebg("ReportDeferredAckStatus(): %s for %s", aNeighbor.GetExtAddress().ToString().AsCString(),![]()
LogDebg("State: %s -> %s", StateToString(mState), StateToString(aState));