CppLogging
1.0.4.0
C++ Logging Library
|
Synchronous logging processor. More...
#include <sync_processor.h>
Public Member Functions | |
SyncProcessor (const std::shared_ptr< Layout > &layout) | |
Initialize synchronous logging processor with a given layout interface. More... | |
SyncProcessor (const SyncProcessor &)=delete | |
SyncProcessor (SyncProcessor &&)=delete | |
virtual | ~SyncProcessor ()=default |
SyncProcessor & | operator= (const SyncProcessor &)=delete |
SyncProcessor & | operator= (SyncProcessor &&)=delete |
bool | ProcessRecord (Record &record) override |
Process the given logging record through all child filters, layouts and appenders. More... | |
void | Flush () override |
Flush the current logging processor. More... | |
Public Member Functions inherited from CppLogging::Processor | |
Processor (const std::shared_ptr< Layout > &layout) | |
Initialize logging processor with a given layout interface. More... | |
Processor (const Processor &)=delete | |
Processor (Processor &&) noexcept=delete | |
virtual | ~Processor () |
Processor & | operator= (const Processor &)=delete |
Processor & | operator= (Processor &&) noexcept=delete |
std::shared_ptr< Layout > & | layout () noexcept |
Get the logging processor layout. More... | |
std::vector< std::shared_ptr< Filter > > & | filters () noexcept |
Get collection of child filters. More... | |
std::vector< std::shared_ptr< Appender > > & | appenders () noexcept |
Get collection of child appenders. More... | |
std::vector< std::shared_ptr< Processor > > & | processors () noexcept |
Get collection of child processors. More... | |
bool | IsStarted () const noexcept override |
Is the logging processor started? More... | |
bool | Start () override |
Start the logging processor. More... | |
bool | Stop () override |
Stop the logging processor. More... | |
virtual bool | FilterRecord (Record &record) |
Filter the given logging record. More... | |
Additional Inherited Members | |
Protected Attributes inherited from CppLogging::Processor | |
std::atomic< bool > | _started {true} |
std::shared_ptr< Layout > | _layout |
std::vector< std::shared_ptr< Filter > > | _filters |
std::vector< std::shared_ptr< Appender > > | _appenders |
std::vector< std::shared_ptr< Processor > > | _processors |
Synchronous logging processor.
Synchronous logging processor process the given logging record under the critical section to avoid races in not thread-safe layouts, filters and appenders.
Thread-safe.
Definition at line 26 of file sync_processor.h.
|
inlineexplicit |
Initialize synchronous logging processor with a given layout interface.
layout | - Logging layout interface |
Definition at line 33 of file sync_processor.h.
|
delete |
|
delete |
|
virtualdefault |
|
overridevirtual |
Flush the current logging processor.
Default behavior of the method will flush in the following sequence:
Reimplemented from CppLogging::Processor.
Definition at line 21 of file sync_processor.cpp.
|
delete |
|
delete |
|
overridevirtual |
Process the given logging record through all child filters, layouts and appenders.
Default behavior of the method will take the given logging record and process it in the following sequence:
record | - Logging record |
Reimplemented from CppLogging::Processor.
Definition at line 13 of file sync_processor.cpp.