Class CLogger#

Inheritance Relationships#

Base Types#

Class Documentation#

class CLogger : public sdv::IInterfaceAccess, public sdv::core::ILogger, public sdv::core::ILoggerConfig#

Logger class implementation for Windows to enable logging in a logfile.

Public Functions

CLogger() = default#

Default constructor.

~CLogger()#

Destructor.

virtual void Log(sdv::core::ELogSeverity eSeverity, const sdv::u8string &ssSrcFile, uint32_t uiSrcLine, sdv::process::TProcessID tProcessID, const sdv::u8string &ssObjectName, const sdv::u8string &ssMessage) override#

Log a message to the SDV log. Overload of sdv::core::ILogger::Log.

Parameters:
  • eSeverity[in] Severity level of the log message which will be logged, e.g. info, warning, error etc.

  • ssSrcFile[in] The source file that caused the log entry.

  • uiSrcLine[in] The line number in the source file that caused the log entry.

  • tProcessID[in] Process ID of the process reporting this log entry.

  • ssObjectName[in] Name of the object if the log entry is supplied by a component.

  • ssMessage[in] The log message that will be logged.

virtual void SetProgramTag(const sdv::u8string &ssTag) override#

Initialize the logging from SDV platform abstraction. Overload of sdv::core::ILoggerConfig::SetProgramTag.

This function needs to be called before starting to log.

Parameters:

ssTag[in] Provided tag to create log.

virtual sdv::u8string GetProgramTag() const override#

Get the program tag used for logging. Overload of sdv::core::ILoggerConfig::GetProgramTag.

Returns:

The string containing the program tag.

virtual void SetLogFilter(sdv::core::ELogSeverity eSeverity, sdv::core::ELogSeverity eViewSeverity) override#

Filter the log messages based on severity. Overload of sdv::core::ILoggerConfig::SetLogFilter.

Parameters:
  • eSeverity[in] The severity level to use as a lowest level for logging. Default is “info” meaning, that debug and trace messages will not be logged.

  • eViewSeverity[in] The severity level to use as a lowest level for viewing. Default is “error” meaning, that debug, trace, info, warning and error messages will not be shown in console output.

virtual sdv::core::ELogSeverity GetLogFilter() const override#

Get the current log severity filter level. Overload of sdv::core::ILoggerConfig::GetLogFilter.

Returns:

The severity level of the log filter.

virtual sdv::core::ELogSeverity GetViewFilter() const override#

Get the current view severity level. Overload of sdv::core::ILoggerConfig::GetViewFilter.

Returns:

The severity level of the view filter.