|
MIRA
|
Simple log sink for writing to streams like cout or file It uses the SimpleFormatter for output. More...
#include <error/LogTxtStreamSink.h>

Public Member Functions | |
| LogTxtStreamSink (std::ostream &stream) | |
| Constructor taking a stream that is used for output. More... | |
| virtual void | consume (const LogRecord &record) |
| Overwrite this in derived class. More... | |
| void | aboutToConsume (const LogRecord &record) |
| Is called by LogCore singleton whenever a new log record is written. More... | |
| void | resetFilter () |
| Resets the log filter. More... | |
| template<typename T > | |
| LogFilterPtr | setFilter (const T &filter) |
| Set the filter. More... | |
| void | resetFormatter () |
| Resets the formatter. More... | |
| template<typename T > | |
| LogFormatterPtr | setFormatter (const T &formatter) |
| Set the formatter. More... | |
Protected Attributes | |
| std::ostream & | mStream |
| LogFormatterPtr | mFormatter |
| LogFilterPtr | mFilter |
Simple log sink for writing to streams like cout or file It uses the SimpleFormatter for output.
| LogTxtStreamSink | ( | std::ostream & | stream | ) |
Constructor taking a stream that is used for output.
|
virtual |
Overwrite this in derived class.
Is called for each log entry that passes the filter (if any)
| record | The log entry. |
Implements LogSink.
Reimplemented in LogConsoleSink.
|
inherited |
Is called by LogCore singleton whenever a new log record is written.
| record | The log entry. |
|
inlineinherited |
Resets the log filter.
No filter will be used to filter log entries.
|
inlineinherited |
Set the filter.
The filter must be copy constructible since we are creating a copy and inherited from LogFilterBase.
| filter | The filter object |
|
inlineinherited |
Resets the formatter.
No formatter will be used to format log entries.
|
inlineinherited |
Set the formatter.
The formatter must be copy constructible since we are creating a copy and inherited from LogFormatterBase.
| formatter | The formatter object |
|
protected |
|
protectedinherited |
|
protectedinherited |
1.8.14