#include <ocsd_error_logger.h>
Definition at line 46 of file ocsd_error_logger.h.
◆ ocsdDefaultErrorLogger()
ocsdDefaultErrorLogger::ocsdDefaultErrorLogger |
( |
| ) |
|
◆ ~ocsdDefaultErrorLogger()
virtual ocsdDefaultErrorLogger::~ocsdDefaultErrorLogger |
( |
| ) |
|
|
virtual |
◆ GetErrorLogVerbosity()
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
-
chan_id | : Trace Source Channel ID (CoreSight Trace ID). |
- 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 |
|
) |
| |
Initialise the error logger with a severity filter, optionally create an output logger on stderr.
◆ LogError()
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()
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 |
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: