mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
09f3d68f6e
* Try fix macos server run * Doc macos build # Please enter the commit message for your changes. Lines starting * CLICKHOUSE-3957 start wip * tests wip * wip * wip * wip * wip * wip * wip * wip * fix * fix * Making logger for clickhouse-local * fixes * wip * wip * wip * wip * clean * cf * wip * fix * Update CMakeLists.txt * Update argsToConfig.h * Update argsToConfig.cpp * Update ExtendedLogChannel.h * Update OwnPatternFormatter.cpp
30 lines
888 B
C++
30 lines
888 B
C++
#pragma once
|
|
#include <vector>
|
|
#include <Poco/AutoPtr.h>
|
|
#include <Poco/Channel.h>
|
|
#include "ExtendedLogChannel.h"
|
|
|
|
|
|
namespace DB
|
|
{
|
|
/// Works as Poco::SplitterChannel, but performs additional work:
|
|
/// passes logs to Client via TCP interface
|
|
/// tries to use extended logging interface of child for more comprehensive logging
|
|
class OwnSplitChannel : public Poco::Channel
|
|
{
|
|
public:
|
|
/// Makes an extended message from msg and passes it to the client logs queue and child (if possible)
|
|
void log(const Poco::Message & msg) override;
|
|
|
|
/// Adds a child channel
|
|
void addChannel(Poco::AutoPtr<Poco::Channel> channel);
|
|
|
|
private:
|
|
using ChannelPtr = Poco::AutoPtr<Poco::Channel>;
|
|
/// Handler and its pointer casted to extended interface
|
|
using ExtendedChannelPtrPair = std::pair<ChannelPtr, ExtendedLogChannel *>;
|
|
std::vector<ExtendedChannelPtrPair> channels;
|
|
};
|
|
|
|
}
|