2019-07-22 13:54:08 +00:00
|
|
|
#pragma once
|
|
|
|
#include <Interpreters/SystemLog.h>
|
|
|
|
|
2019-07-22 15:09:33 +00:00
|
|
|
namespace DB
|
|
|
|
{
|
2019-07-22 13:54:08 +00:00
|
|
|
|
|
|
|
using Poco::Message;
|
|
|
|
|
|
|
|
struct TextLogElement
|
|
|
|
{
|
|
|
|
time_t event_time{};
|
|
|
|
UInt32 microseconds;
|
|
|
|
|
|
|
|
String thread_name;
|
2020-02-02 20:01:13 +00:00
|
|
|
UInt64 thread_id;
|
2019-07-22 13:54:08 +00:00
|
|
|
|
2019-07-22 15:09:33 +00:00
|
|
|
Message::Priority level = Message::PRIO_TRACE;
|
2019-07-22 13:54:08 +00:00
|
|
|
|
|
|
|
String query_id;
|
|
|
|
String logger_name;
|
|
|
|
String message;
|
|
|
|
|
|
|
|
String source_file;
|
|
|
|
UInt64 source_line;
|
|
|
|
|
|
|
|
static std::string name() { return "TextLog"; }
|
|
|
|
static Block createBlock();
|
|
|
|
void appendToBlock(Block & block) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class TextLog : public SystemLog<TextLogElement>
|
|
|
|
{
|
|
|
|
using SystemLog<TextLogElement>::SystemLog;
|
|
|
|
};
|
|
|
|
|
2019-07-22 15:09:33 +00:00
|
|
|
}
|