Avoid printing warning about cerr and colors in default cli mode (#4400)

In cli mode, we default to colors plus cerr so we always get a warning
about colors not showing cerr. Now it defaults to cerr and no colors and
the warning does not show up.
This commit is contained in:
Dimitrios Siganos 2024-01-26 23:05:30 +07:00 committed by GitHub
commit 6b6df38cd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -282,6 +282,7 @@ nano::log_config nano::log_config::cli_default ()
{
log_config config{};
config.default_level = nano::log::level::critical;
config.console.colors = false; // to avoid printing warning about cerr and colors
config.console.to_cerr = true; // Use cerr to avoid interference with CLI output that goes to stdout
config.file.enable = false;
return config;