|
OpenCSD - CoreSight Trace Decode Library 1.8.3
|
#include <ocsd_error_logger.h>


Public Member Functions | |
| ocsdDefaultErrorLogger () | |
| virtual | ~ocsdDefaultErrorLogger () |
| bool | 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. | |
| virtual ocsdMsgLogger * | getOutputLogger () |
| virtual void | setOutputLogger (ocsdMsgLogger *pLogger) |
| virtual const ocsd_hndl_err_log_t | RegisterErrorSource (const std::string &component_name) |
| virtual void | LogError (const ocsd_hndl_err_log_t handle, const ocsdError *Error) |
| virtual void | LogMessage (const ocsd_hndl_err_log_t handle, const ocsd_err_severity_t filter_level, const std::string &msg) |
| virtual const ocsd_err_severity_t | GetErrorLogVerbosity () const |
| virtual ocsdError * | GetLastError () |
| virtual ocsdError * | GetLastIDError (const uint8_t chan_id) |
| Public Member Functions inherited from ITraceErrorLog | |
| ITraceErrorLog () | |
| virtual | ~ITraceErrorLog () |
Additional Inherited Members | |
| Public Types inherited from ITraceErrorLog | |
| enum | generic_handles { HANDLE_GEN_ERR = 0 , HANDLE_GEN_WARN , HANDLE_GEN_INFO , HANDLE_FIRST_REGISTERED_COMPONENT } |
Definition at line 46 of file ocsd_error_logger.h.
| ocsdDefaultErrorLogger::ocsdDefaultErrorLogger | ( | ) |
|
virtual |
|
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.
Implements ITraceErrorLog.
Definition at line 62 of file ocsd_error_logger.h.
|
inlinevirtual |
Get a pointer to the last logged error. Returns 0 if no errors have been logged.
Implements ITraceErrorLog.
Definition at line 64 of file ocsd_error_logger.h.
|
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.
| chan_id | : Trace Source Channel ID (CoreSight Trace ID). |
Implements ITraceErrorLog.
Definition at line 65 of file ocsd_error_logger.h.
|
inlinevirtual |
Implements ITraceErrorLog.
Definition at line 54 of file ocsd_error_logger.h.
| 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.
|
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.
| handle | : Component handle or standard generic handle |
| *Error | : Pointer to an error object. |
Implements ITraceErrorLog.
|
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()
| handle | : Component handle or standard generic handle. |
| filter_level | : Verbosity filter. |
| msg | : Pointer to an error object. |
Implements ITraceErrorLog.
|
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.
| &component_name | : name of the component. |
Implements ITraceErrorLog.
|
virtual |
Implements ITraceErrorLog.