1#pragma once
2#include <DataStreams/IBlockOutputStream.h>
3#include <IO/WriteBuffer.h>
4
5
6namespace DB
7{
8
9/// Prints internal server logs
10/// Input blocks have to have the same structure as SystemLogsQueue::getSampleBlock()
11/// NOTE: IRowOutputStream does not suite well for this case
12class InternalTextLogsRowOutputStream : public IBlockOutputStream
13{
14public:
15
16 InternalTextLogsRowOutputStream(WriteBuffer & buf_out) : wb(buf_out) {}
17
18 Block getHeader() const override;
19
20 void write(const Block & block) override;
21
22 void flush() override
23 {
24 wb.next();
25 }
26
27private:
28
29 WriteBuffer & wb;
30};
31
32}
33