Warning about using cerr with colors

This commit is contained in:
Piotr Wójcik 2024-01-23 18:45:06 +01:00
commit 81e6b5747c

View file

@ -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);
}