From 2aa335144cd4e2e4742bcb1e5592432662aafade Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 31 Jul 2018 09:18:12 -0700 Subject: [PATCH] [mle] fix logging at NOTE level (#2933) This commit fixes the issue when building at `LOG_LEVEL_NOTE` ensuring methods such as `AttachModeToString` are included. --- src/core/thread/mle.cpp | 4 ++-- src/core/thread/mle.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/thread/mle.cpp b/src/core/thread/mle.cpp index 6296a5c11..9f4b812b4 100644 --- a/src/core/thread/mle.cpp +++ b/src/core/thread/mle.cpp @@ -4076,7 +4076,7 @@ const char *Mle::RoleToString(otDeviceRole aRole) return roleString; } -#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MLE == 1) +#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MLE == 1) const char *Mle::AttachModeToString(AttachMode aMode) { const char *str = "unknown"; @@ -4171,7 +4171,7 @@ const char *Mle::ReattachStateToString(ReattachState aState) return str; } -#endif // (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MLE == 1) +#endif // (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MLE == 1) } // namespace Mle } // namespace ot diff --git a/src/core/thread/mle.hpp b/src/core/thread/mle.hpp index 3faba95f8..75bf425d6 100644 --- a/src/core/thread/mle.hpp +++ b/src/core/thread/mle.hpp @@ -1522,7 +1522,7 @@ protected: */ void InformPreviousChannel(void); -#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_INFO) && (OPENTHREAD_CONFIG_LOG_MLE == 1) +#if (OPENTHREAD_CONFIG_LOG_LEVEL >= OT_LOG_LEVEL_NOTE) && (OPENTHREAD_CONFIG_LOG_MLE == 1) /** * This method converts an `AttachMode` enumeration value into a human-readable string. *