mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
a7bbf83c91
This reverts commit cdb2c8a770
.
33 lines
618 B
C++
33 lines
618 B
C++
#pragma once
|
|
#include <DataStreams/IBlockOutputStream.h>
|
|
#include <IO/WriteBuffer.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Prints internal server logs
|
|
/// Input blocks have to have the same structure as SystemLogsQueue::getSampleBlock()
|
|
/// NOTE: IRowOutputStream does not suite well for this case
|
|
class InternalTextLogsRowOutputStream : public IBlockOutputStream
|
|
{
|
|
public:
|
|
|
|
InternalTextLogsRowOutputStream(WriteBuffer & buf_out) : wb(buf_out) {}
|
|
|
|
Block getHeader() const override;
|
|
|
|
void write(const Block & block) override;
|
|
|
|
void flush() override
|
|
{
|
|
wb.next();
|
|
}
|
|
|
|
private:
|
|
|
|
WriteBuffer & wb;
|
|
};
|
|
|
|
}
|