Loading...
Searching...
No Matches
ITraceErrorLog Class Referenceabstract
OpenCSD Library : Interfaces

Error logging interface. More...

`#include <trc_error_log_i.h>`

Inheritance diagram for ITraceErrorLog:
[legend]

## Public Types

enum | generic_handles { HANDLE_GEN_ERR = 0 , HANDLE_GEN_WARN , HANDLE_GEN_INFO , HANDLE_FIRST_REGISTERED_COMPONENT }

## Public Member Functions

| ITraceErrorLog ()
virtual | ~ITraceErrorLog ()
virtual const ocsd_hndl_err_log_t | RegisterErrorSource (const std::string &component_name)=0
virtual const ocsd_err_severity_t | GetErrorLogVerbosity () const =0
virtual void | LogError (const ocsd_hndl_err_log_t handle, const ocsdError *Error)=0
virtual void | LogMessage (const ocsd_hndl_err_log_t handle, const ocsd_err_severity_t filter_level, const std::string &msg)=0
virtual ocsdError * | GetLastError ()=0
virtual ocsdError * | GetLastIDError (const uint8_t chan_id)=0
virtual ocsdMsgLogger * | getOutputLogger ()=0
virtual void | setOutputLogger (ocsdMsgLogger *pLogger)=0

## Detailed Description

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.

## Member Enumeration Documentation

## generic_handles

enum ITraceErrorLog::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.

## Constructor & Destructor Documentation

## ITraceErrorLog()

ITraceErrorLog::ITraceErrorLog | ( |  | ) |

inline

Definition at line 59 of file trc_error_log_i.h.

## ~ITraceErrorLog()

virtual ITraceErrorLog::~ITraceErrorLog | ( |  | ) |

inline virtual

Definition at line 60 of file trc_error_log_i.h.

## Member Function Documentation

## 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

  chan_id | : Trace Source Channel ID (CoreSight Trace ID).

Returns
  ocsdError *: last error pointer for ID or 0.

Implemented in ocsdDefaultErrorLogger.

## getOutputLogger()

virtual ocsdMsgLogger * ITraceErrorLog::getOutputLogger | ( |  | ) |

pure virtual

Implemented in ocsdDefaultErrorLogger.

## 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

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

Implemented in ocsdDefaultErrorLogger.

The documentation for this class was generated from the following file:

- /build/libopencsd-8WV101/libopencsd-1.5.5/decoder/include/interfaces/trc_error_log_i.h