diff --git a/src/Loggers/Loggers.cpp b/src/Loggers/Loggers.cpp index c02363c6017..fc34c978374 100644 --- a/src/Loggers/Loggers.cpp +++ b/src/Loggers/Loggers.cpp @@ -204,20 +204,16 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log { max_log_level = console_log_level; } + + Poco::AutoPtr pf = new OwnPatternFormatter; if (config.has("logger.json")) - { - Poco::AutoPtr pf = new OwnJSONPatternFormatter(); - Poco::AutoPtr log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel); - log->setLevel(console_log_level); - split->addChannel(log, "console"); - } + pf = new OwnJSONPatternFormatter; else - { - Poco::AutoPtr pf = new OwnPatternFormatter(color_enabled); - Poco::AutoPtr log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel); - log->setLevel(console_log_level); - split->addChannel(log, "console"); - } + pf = new OwnPatternFormatter(true); + + Poco::AutoPtr log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel); + log->setLevel(console_log_level); + split->addChannel(log, "console"); }