Error logging interface.This class provides a standard interface to the decoder error logger for all trace decode and reader components.
More...
#include <trc_error_log_i.h>
Error logging interface.
This class provides a standard interface to the decoder error logger for all trace decode and reader components.
Implementation will determine if and how the errors and messages are logged.
Definition at line 56 of file trc_error_log_i.h.
◆ generic_handles
Enumerator |
---|
HANDLE_GEN_ERR | |
HANDLE_GEN_WARN | |
HANDLE_GEN_INFO | |
HANDLE_FIRST_REGISTERED_COMPONENT | 1st valid handle value for components registered with logger
|
Definition at line 123 of file trc_error_log_i.h.
◆ ITraceErrorLog()
ITraceErrorLog::ITraceErrorLog |
( |
| ) |
|
|
inline |
◆ ~ITraceErrorLog()
virtual ITraceErrorLog::~ITraceErrorLog |
( |
| ) |
|
|
inlinevirtual |
◆ GetErrorLogVerbosity()
virtual const ocsd_err_severity_t ITraceErrorLog::GetErrorLogVerbosity |
( |
| ) |
const |
|
pure virtual |
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.
Implemented in ocsdDefaultErrorLogger.
◆ GetLastError()
virtual ocsdError* ITraceErrorLog::GetLastError |
( |
| ) |
|
|
pure virtual |
Get a pointer to the last logged error. Returns 0 if no errors have been logged.
- Returns
- ocsdError *: last error pointer.
Implemented in ocsdDefaultErrorLogger.
◆ GetLastIDError()
virtual ocsdError* ITraceErrorLog::GetLastIDError |
( |
const uint8_t |
chan_id | ) |
|
|
pure virtual |
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.
Implemented in ocsdDefaultErrorLogger.
◆ getOutputLogger()
◆ LogError()
virtual void ITraceErrorLog::LogError |
( |
const ocsd_hndl_err_log_t |
handle, |
|
|
const ocsdError * |
Error |
|
) |
| |
|
pure 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. |
Implemented in ocsdDefaultErrorLogger.
◆ LogMessage()
virtual void ITraceErrorLog::LogMessage |
( |
const ocsd_hndl_err_log_t |
handle, |
|
|
const ocsd_err_severity_t |
filter_level, |
|
|
const std::string & |
msg |
|
) |
| |
|
pure 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. |
Implemented in ocsdDefaultErrorLogger.
◆ RegisterErrorSource()
virtual const ocsd_hndl_err_log_t ITraceErrorLog::RegisterErrorSource |
( |
const std::string & |
component_name | ) |
|
|
pure 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.
Implemented in ocsdDefaultErrorLogger.
◆ setOutputLogger()
virtual void ITraceErrorLog::setOutputLogger |
( |
ocsdMsgLogger * |
pLogger | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file:
- /build/libopencsd-_mrJ7S/libopencsd-0.8.1/decoder/include/interfaces/trc_error_log_i.h