1#include "OwnFormattingChannel.h"
2#include "OwnPatternFormatter.h"
3
4
5namespace DB
6{
7void OwnFormattingChannel::logExtended(const ExtendedLogMessage & msg)
8{
9 if (pChannel && priority >= msg.base.getPriority())
10 {
11 if (pFormatter)
12 {
13 std::string text;
14 pFormatter->formatExtended(msg, text);
15 pChannel->log(Poco::Message(msg.base, text));
16 }
17 else
18 {
19 pChannel->log(msg.base);
20 }
21 }
22}
23
24void OwnFormattingChannel::log(const Poco::Message & msg)
25{
26 logExtended(ExtendedLogMessage::getFrom(msg));
27}
28
29OwnFormattingChannel::~OwnFormattingChannel() = default;
30
31
32}
33