#include <ocsd_error_logger.h>
Definition at line 46 of file ocsd_error_logger.h.
◆ ocsdDefaultErrorLogger()
ocsdDefaultErrorLogger::ocsdDefaultErrorLogger |
( |
| ) |
|
◆ ~ocsdDefaultErrorLogger()
virtual ocsdDefaultErrorLogger::~ocsdDefaultErrorLogger |
( |
| ) |
|
|
virtual |
◆ GetErrorLogVerbosity()
virtual const ocsd_err_severity_t ocsdDefaultErrorLogger::GetErrorLogVerbosity |
( |
| ) |
const |
|
inlinevirtual |
Return the verbosity level of the logger. Errors of the returned ocsd_err_severity_t severity or lower will be logged, others are ignored.
- Returns
- ocsd_err_severity_t : Current logging severity level.
Implements ITraceErrorLog.
Definition at line 62 of file ocsd_error_logger.h.
◆ GetLastError()
virtual ocsdError* ocsdDefaultErrorLogger::GetLastError |
( |
| ) |
|
|
inlinevirtual |
◆ GetLastIDError()
virtual ocsdError* ocsdDefaultErrorLogger::GetLastIDError |
( |
const uint8_t |
chan_id | ) |
|
|
inlinevirtual |
Get the last error associated with the given Trace source channel ID. returns a pointer to the error or 0 if no errors associated with the ID.
- Parameters
-
- Returns
- ocsdError *: last error pointer for ID or 0.
Implements ITraceErrorLog.
Definition at line 65 of file ocsd_error_logger.h.
◆ getOutputLogger()
virtual ocsdMsgLogger* ocsdDefaultErrorLogger::getOutputLogger |
( |
| ) |
|
|
inlinevirtual |
◆ initErrorLogger()
bool ocsdDefaultErrorLogger::initErrorLogger |
( |
const ocsd_err_severity_t |
verbosity, |
|
|
bool |
bCreateOutputLogger = false |
|
) |
| |
◆ LogError()
virtual void ocsdDefaultErrorLogger::LogError |
( |
const ocsd_hndl_err_log_t |
handle, |
|
|
const ocsdError * |
Error |
|
) |
| |
|
virtual |
Log an error. Pass an error object and the component or generic handle to associate with the error. Error will be saved for access by GetLastError().
If logger implementation has output print logging enabled then this may be printed to file or screen.
- Parameters
-
handle | : Component handle or standard generic handle |
*Error | : Pointer to an error object. |
Implements ITraceErrorLog.
◆ LogMessage()
virtual void ocsdDefaultErrorLogger::LogMessage |
( |
const ocsd_hndl_err_log_t |
handle, |
|
|
const ocsd_err_severity_t |
filter_level, |
|
|
const std::string & |
msg |
|
) |
| |
|
virtual |
Log a general message. Associated with component or use generic handle. Message logged to same output as errors if output enabled, but not saved for GetLastError()
- Parameters
-
handle | : Component handle or standard generic handle. |
filter_level | : Verbosity filter. |
msg | : Pointer to an error object. |
Implements ITraceErrorLog.
◆ RegisterErrorSource()
virtual const ocsd_hndl_err_log_t ocsdDefaultErrorLogger::RegisterErrorSource |
( |
const std::string & |
component_name | ) |
|
|
virtual |
default destructor
Register a named component error source. Allows the logger to associate errors with components. returned handle to be used with subsequent error log calls.
- Parameters
-
&component_name | : name of the component. |
- Returns
- virtual const : Handle associated with the component.
Implements ITraceErrorLog.
◆ setOutputLogger()
virtual void ocsdDefaultErrorLogger::setOutputLogger |
( |
ocsdMsgLogger * |
pLogger | ) |
|
|
virtual |
The documentation for this class was generated from the following file: