From 6b6df38cd5d5b8c08a108b6ac993f742fe5d1832 Mon Sep 17 00:00:00 2001 From: Dimitrios Siganos Date: Fri, 26 Jan 2024 23:05:30 +0700 Subject: [PATCH] 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. --- nano/lib/logging.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nano/lib/logging.cpp b/nano/lib/logging.cpp index 4147ea5a3e..3630c23d02 100644 --- a/nano/lib/logging.cpp +++ b/nano/lib/logging.cpp @@ -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;