From 39ed443dab3fb60d69232a0bb31f92d60a84ad0a Mon Sep 17 00:00:00 2001 From: WenTao Ou Date: Thu, 2 Jun 2022 10:54:55 +0800 Subject: [PATCH] Keep `NoopLogHandler::Handle` empty --- sdk/src/common/global_log_handler.cc | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/sdk/src/common/global_log_handler.cc b/sdk/src/common/global_log_handler.cc index 787fa667dd..c86b652c70 100644 --- a/sdk/src/common/global_log_handler.cc +++ b/sdk/src/common/global_log_handler.cc @@ -37,26 +37,12 @@ void DefaultLogHandler::Handle(LogLevel level, std::cout << output_s.str(); // thread safe. } -void NoopLogHandler::Handle(LogLevel level, - const char *file, - int line, - const char *msg, - const sdk::common::AttributeMap &attributes) noexcept -{ - std::stringstream output_s; - output_s << "[" << LevelToString(level) << "] "; - if (file != nullptr) - { - output_s << "File: " << file << ":" << line; - } - if (msg != nullptr) - { - output_s << msg; - } - output_s << std::endl; - // TBD - print attributes - std::cout << output_s.str(); // thread safe. -} +void NoopLogHandler::Handle(LogLevel, + const char *, + int, + const char *, + const sdk::common::AttributeMap &) noexcept +{} std::pair, LogLevel> &GlobalLogHandler::GetHandlerAndLevel() noexcept {