DDraceNetwork Docs
|
#include <logger.h>
Public Member Functions | |
void | Set (std::shared_ptr< ILogger > pLogger) |
void | Log (const CLogMessage *pMessage) override |
void | GlobalFinish () override |
void | OnFilterChange () override |
Public Member Functions inherited from ILogger | |
virtual | ~ILogger () |
void | SetFilter (const CLogFilter &Filter) |
virtual void | Log (const CLogMessage *pMessage)=0 |
virtual void | GlobalFinish () |
virtual void | OnFilterChange () |
Private Attributes | |
std::shared_ptr< ILogger > | m_pLogger |
std::vector< CLogMessage > | m_vPending |
CLock | m_PendingLock |
Additional Inherited Members | |
Protected Attributes inherited from ILogger | |
CLogFilter | m_Filter |
Logger that collects log messages in memory until it is replaced by another logger.
Useful when you want to set a global logger without all logging targets being configured.
This logger forwards SetFilter
calls, SetFilter
calls before a logger is set have no effect.
|
overridevirtual |
Flushes output buffers and shuts down. Global loggers cannot be destroyed because they might be accessed from multiple threads concurrently.
This function is called on the global logger by log_global_logger_finish
when the program is about to shut down and loggers are supposed to finish writing the log messages they have received so far.
The destructor of this ILogger
instance will not be called if this function is called.
Reimplemented from ILogger.
|
overridevirtual |
Send the specified message to the logging backend.
pMessage | Struct describing the log message. |
Implements ILogger.
|
overridevirtual |
Notifies the logger of a changed m_Filter
.
Reimplemented from ILogger.
void CFutureLogger::Set | ( | std::shared_ptr< ILogger > | pLogger | ) |
Replace the CFutureLogger
instance with the given logger. It'll receive all log messages sent to the CFutureLogger
so far.
|
private |
|
private |
|
private |