Skip to content

Commit

Permalink
Keep NoopLogHandler::Handle empty
Browse files Browse the repository at this point in the history
  • Loading branch information
owent committed Jun 2, 2022
1 parent 12f8413 commit 39ed443
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions sdk/src/common/global_log_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<nostd::shared_ptr<LogHandler>, LogLevel> &GlobalLogHandler::GetHandlerAndLevel() noexcept
{
Expand Down

0 comments on commit 39ed443

Please sign in to comment.