9 #ifndef CPPLOGGING_PROCESSORS_BUFFERED_PROCESSOR_H
10 #define CPPLOGGING_PROCESSORS_BUFFERED_PROCESSOR_H
38 { _buffer.reserve(capacity); }
48 void Flush()
override;
52 std::vector<Record> _buffer;
54 void ProcessBufferedRecords();
Buffered logging processor.
bool ProcessRecord(Record &record) override
Process the given logging record through all child filters, layouts and appenders.
BufferedProcessor(const std::shared_ptr< Layout > &layout, size_t limit=65536, size_t capacity=8192)
Initialize buffered processor with a given layout interface, limit and capacity.
virtual ~BufferedProcessor()=default
BufferedProcessor(BufferedProcessor &&)=delete
BufferedProcessor & operator=(const BufferedProcessor &)=delete
void Flush() override
Flush the current logging processor.
BufferedProcessor & operator=(BufferedProcessor &&)=delete
BufferedProcessor(const BufferedProcessor &)=delete
Logging processor interface.
std::shared_ptr< Layout > & layout() noexcept
Get the logging processor layout.
C++ Logging project definitions.
Logging processor interface definition.