mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Update src/Loggers/Loggers.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
This commit is contained in:
parent
943affe2da
commit
968e867a0d
@ -204,21 +204,17 @@ void Loggers::buildLoggers(Poco::Util::AbstractConfiguration & config, Poco::Log
|
||||
{
|
||||
max_log_level = console_log_level;
|
||||
}
|
||||
|
||||
Poco::AutoPtr<OwnPatternFormatter> pf = new OwnPatternFormatter;
|
||||
if (config.has("logger.json"))
|
||||
{
|
||||
Poco::AutoPtr<OwnJSONPatternFormatter> pf = new OwnJSONPatternFormatter();
|
||||
Poco::AutoPtr<DB::OwnFormattingChannel> log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel);
|
||||
log->setLevel(console_log_level);
|
||||
split->addChannel(log, "console");
|
||||
}
|
||||
pf = new OwnJSONPatternFormatter;
|
||||
else
|
||||
{
|
||||
Poco::AutoPtr<OwnPatternFormatter> pf = new OwnPatternFormatter(color_enabled);
|
||||
pf = new OwnPatternFormatter(true);
|
||||
|
||||
Poco::AutoPtr<DB::OwnFormattingChannel> log = new DB::OwnFormattingChannel(pf, new Poco::ConsoleChannel);
|
||||
log->setLevel(console_log_level);
|
||||
split->addChannel(log, "console");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
split->open();
|
||||
|
Loading…
Reference in New Issue
Block a user