mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-05 15:21:43 +00:00
b7ef5a699c
* Get rid of non-existent vectorclass * Move FastMemcpy to contribs * Restore comments * Disable FastMemcpy on non-Linux * Fix cmake file * Don't build FastMemcpy for ARM64 * Replace FastMemcpy submodule with its contents * Fix cmake file * Move widechar_width to contrib/ * Move sumbur to contrib/ * Move consistent-hashing to contrib/ * Fix UBSan tests
41 lines
868 B
C++
41 lines
868 B
C++
#pragma once
|
|
#include <string>
|
|
|
|
namespace Poco
|
|
{
|
|
class Message;
|
|
}
|
|
|
|
namespace DB
|
|
{
|
|
/// Poco::Message with more ClickHouse-specific info
|
|
/// NOTE: Poco::Message is not polymorphic class, so we can't use inheritance in couple with dynamic_cast<>()
|
|
class ExtendedLogMessage
|
|
{
|
|
public:
|
|
explicit ExtendedLogMessage(const Poco::Message & base_) : base(base_) {}
|
|
|
|
/// Attach additional data to the message
|
|
static ExtendedLogMessage getFrom(const Poco::Message & base);
|
|
|
|
// Do not copy for efficiency reasons
|
|
const Poco::Message & base;
|
|
|
|
uint32_t time_seconds = 0;
|
|
uint32_t time_microseconds = 0;
|
|
|
|
uint64_t thread_id = 0;
|
|
std::string query_id;
|
|
};
|
|
|
|
|
|
/// Interface extension of Poco::Channel
|
|
class ExtendedLogChannel
|
|
{
|
|
public:
|
|
virtual void logExtended(const ExtendedLogMessage & msg) = 0;
|
|
virtual ~ExtendedLogChannel() = default;
|
|
};
|
|
|
|
}
|