Skip to content

Commit

Permalink
Warning about using cerr with colors
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Jan 23, 2024
1 parent b4eb3a0 commit 81e6b57
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nano/lib/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ void nano::logger::initialize_common (nano::log_config const & config, std::opti
}
else
{
if (config.console.colors)
{
std::cerr << "WARNING: Logging to cerr is enabled, console colors will be disabled" << std::endl;
}

auto cerr_sink = std::make_shared<spdlog::sinks::stderr_sink_mt> ();
global_sinks.push_back (cerr_sink);
}
Expand Down

0 comments on commit 81e6b57

Please sign in to comment.