diff --git a/src/core/model/log.cc b/src/core/model/log.cc index 9dd2c047b..54c9942ec 100644 --- a/src/core/model/log.cc +++ b/src/core/model/log.cc @@ -232,13 +232,6 @@ LogComponent::EnvVarCheck() Enable((LogLevel)level); } -bool -LogComponent::IsEnabled(const LogLevel level) const -{ - // LogComponentEnableEnvVar (); - return level & m_levels; -} - bool LogComponent::IsNoneEnabled() const { diff --git a/src/core/model/log.h b/src/core/model/log.h index cd8f397f5..39792ee70 100644 --- a/src/core/model/log.h +++ b/src/core/model/log.h @@ -326,13 +326,22 @@ class LogComponent * functions which help implement the logging facility. */ LogComponent(const std::string& name, const std::string& file, const LogLevel mask = LOG_NONE); + /** * Check if this LogComponent is enabled for \c level * * @param [in] level The level to check for. * @return \c true if we are enabled at \c level. + * + * @internal + * This function is defined in the header to enable inlining for better performance. See: + * https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/2448#note_2527898962 */ - bool IsEnabled(const LogLevel level) const; + bool IsEnabled(const LogLevel level) const + { + return level & m_levels; + } + /** * Check if all levels are disabled. *