| 1 | #pragma once |
|---|---|
| 2 | #include <Interpreters/SystemLog.h> |
| 3 | |
| 4 | namespace DB |
| 5 | { |
| 6 | |
| 7 | using Poco::Message; |
| 8 | |
| 9 | struct TextLogElement |
| 10 | { |
| 11 | time_t event_time{}; |
| 12 | UInt32 microseconds; |
| 13 | |
| 14 | String thread_name; |
| 15 | UInt32 os_thread_id; |
| 16 | UInt32 thread_number; |
| 17 | |
| 18 | Message::Priority level = Message::PRIO_TRACE; |
| 19 | |
| 20 | String query_id; |
| 21 | String logger_name; |
| 22 | String message; |
| 23 | |
| 24 | String source_file; |
| 25 | UInt64 source_line; |
| 26 | |
| 27 | static std::string name() { return "TextLog"; } |
| 28 | static Block createBlock(); |
| 29 | void appendToBlock(Block & block) const; |
| 30 | }; |
| 31 | |
| 32 | class TextLog : public SystemLog<TextLogElement> |
| 33 | { |
| 34 | using SystemLog<TextLogElement>::SystemLog; |
| 35 | }; |
| 36 | |
| 37 | } |
| 38 |