#pragma once #include #include #include #include #include namespace DB { using Poco::Message; struct TextLogElement { time_t event_time{}; Decimal64 event_time_microseconds{}; String thread_name; UInt64 thread_id{}; Message::Priority level = Message::PRIO_TRACE; String query_id; String logger_name; String message; String source_file; UInt64 source_line{}; std::string_view message_format_string; static std::string name() { return "TextLog"; } static ColumnsDescription getColumnsDescription(); static NamesAndAliases getNamesAndAliases() { return {}; } void appendToBlock(MutableColumns & columns) const; }; class TextLog : public SystemLog { public: using Queue = SystemLogQueue; explicit TextLog(ContextPtr context_, const SystemLogSettings & settings); static std::shared_ptr getLogQueue(const SystemLogQueueSettings & settings) { static std::shared_ptr queue = std::make_shared(settings); return queue; } static consteval bool shouldTurnOffLogger() { return true; } }; }