mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-20 05:05:38 +00:00
34 lines
671 B
C++
34 lines
671 B
C++
#include <daemon/OwnFormattingChannel.h>
|
|
#include <daemon/OwnPatternFormatter.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void OwnFormattingChannel::logExtended(const ExtendedLogMessage & msg)
|
|
{
|
|
if (pChannel && priority >= msg.base.getPriority())
|
|
{
|
|
if (pFormatter)
|
|
{
|
|
std::string text;
|
|
pFormatter->formatExtended(msg, text);
|
|
pChannel->log(Poco::Message(msg.base, text));
|
|
}
|
|
else
|
|
{
|
|
pChannel->log(msg.base);
|
|
}
|
|
}
|
|
}
|
|
|
|
void OwnFormattingChannel::log(const Poco::Message & msg)
|
|
{
|
|
logExtended(ExtendedLogMessage::getFrom(msg));
|
|
}
|
|
|
|
OwnFormattingChannel::~OwnFormattingChannel() = default;
|
|
|
|
|
|
}
|