Add API calls to allow set / get of output logger via interface.
Signed-off-by: Mike Leach mike.leach@linaro.org --- decoder/include/common/ocsd_error_logger.h | 4 ++-- decoder/include/interfaces/trc_error_log_i.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/decoder/include/common/ocsd_error_logger.h b/decoder/include/common/ocsd_error_logger.h index 8505a27..d601397 100644 --- a/decoder/include/common/ocsd_error_logger.h +++ b/decoder/include/common/ocsd_error_logger.h @@ -51,8 +51,8 @@ public:
bool initErrorLogger(const ocsd_err_severity_t verbosity, bool bCreateOutputLogger = false);
- ocsdMsgLogger *getOutputLogger() { return m_output_logger; }; - void setOutputLogger(ocsdMsgLogger *pLogger); + virtual ocsdMsgLogger *getOutputLogger() { return m_output_logger; }; + virtual void setOutputLogger(ocsdMsgLogger *pLogger);
virtual const ocsd_hndl_err_log_t RegisterErrorSource(const std::string &component_name);
diff --git a/decoder/include/interfaces/trc_error_log_i.h b/decoder/include/interfaces/trc_error_log_i.h index c9e9381..2e64ac2 100644 --- a/decoder/include/interfaces/trc_error_log_i.h +++ b/decoder/include/interfaces/trc_error_log_i.h @@ -40,6 +40,7 @@ #include <string>
class ocsdError; +class ocsdMsgLogger;
/*! * @class ITraceErrorLog @@ -116,6 +117,8 @@ public: */ virtual ocsdError *GetLastIDError(const uint8_t chan_id) = 0;
+ virtual ocsdMsgLogger *getOutputLogger() = 0; + virtual void setOutputLogger(ocsdMsgLogger *pLogger) = 0;
enum generic_handles { HANDLE_GEN_ERR = 0,