CppLogging
1.0.4.0
C++ Logging Library
|
Logging processor interface. More...
#include <processor.h>
Public Member Functions | |
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... | |
virtual bool | ProcessRecord (Record &record) |
Process the given logging record through all child filters, layouts and appenders. More... | |
virtual void | Flush () |
Flush the current logging processor. More... | |
Protected Attributes | |
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 |
Logging processor interface.
Logging processor takes an instance of a single logging record and process it though all child filters, layouts and appenders.
Not thread-safe.
Definition at line 30 of file processor.h.
|
inlineexplicit |
Initialize logging processor with a given layout interface.
layout | - Logging layout interface |
Definition at line 37 of file processor.h.
|
delete |
|
deletenoexcept |
|
virtual |
Definition at line 13 of file processor.cpp.
|
inlinenoexcept |
Get collection of child appenders.
Definition at line 50 of file processor.h.
|
virtual |
Filter the given logging record.
record | - Logging record |
Definition at line 90 of file processor.cpp.
|
inlinenoexcept |
Get collection of child filters.
Definition at line 48 of file processor.h.
|
virtual |
Flush the current logging processor.
Default behavior of the method will flush in the following sequence:
Reimplemented in CppLogging::SyncProcessor, CppLogging::BufferedProcessor, CppLogging::AsyncWaitProcessor, and CppLogging::AsyncWaitFreeProcessor.
Definition at line 127 of file processor.cpp.
|
inlineoverridevirtualnoexcept |
Is the logging processor started?
Reimplemented from CppLogging::Element.
Definition at line 55 of file processor.h.
|
inlinenoexcept |
Get the logging processor layout.
Definition at line 46 of file processor.h.
|
inlinenoexcept |
Get collection of child processors.
Definition at line 52 of file processor.h.
|
virtual |
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 in CppLogging::SyncProcessor, CppLogging::ExclusiveProcessor, CppLogging::BufferedProcessor, CppLogging::AsyncWaitProcessor, and CppLogging::AsyncWaitFreeProcessor.
Definition at line 100 of file processor.cpp.
|
overridevirtual |
Start the logging processor.
Reimplemented from CppLogging::Element.
Reimplemented in CppLogging::AsyncWaitProcessor, and CppLogging::AsyncWaitFreeProcessor.
Definition at line 30 of file processor.cpp.
|
overridevirtual |
Stop the logging processor.
Reimplemented from CppLogging::Element.
Reimplemented in CppLogging::AsyncWaitProcessor, and CppLogging::AsyncWaitFreeProcessor.
Definition at line 60 of file processor.cpp.
|
protected |
Definition at line 101 of file processor.h.
|
protected |
Definition at line 100 of file processor.h.
|
protected |
Definition at line 99 of file processor.h.
|
protected |
Definition at line 102 of file processor.h.
|
protected |
Definition at line 98 of file processor.h.