Resource Tuner
Loading...
Searching...
No Matches
Logger Class Reference

Logger. More...

#include <Logger.h>

Static Public Member Functions

static void configure (int32_t level, int8_t levelSpecificLogging, RedirectOptions redirectOutputTo)
 Configure the Logger.
 
static void log (int32_t level, const std::string &tag, const std::string &funcName, const std::string &message)
 Responsible for actually Logging a Message to the desired Medium (file or syslog)
 

Detailed Description

Logger.

Provides a Simplified and Consistent interface for Logging across different Targets Logging levels supported:

  1. Debug - For almost all non-essential debug statements.
  2. Info - For essential statements.
  3. Error - Statements if printed, shows errors.

Definition at line 115 of file Logger.h.

Member Function Documentation

◆ configure()

static void Logger::configure ( int32_t  level,
int8_t  levelSpecificLogging,
RedirectOptions  redirectOutputTo 
)
static

Configure the Logger.

The logger is designed to be Customizable. Among the knobs which can be configured are: 1) What levels to Log, (User can specify an exact value say ERROR, or a Lower Bound say INFO). In case of Lower Bound Config for Logging, any Message with Log Level higher than the specified Level will be logged. 2) Output Redirection: Output can be captured in a File or directly in syslog

Parameters
levelThe exact level to Log or the Lower Bound Logging level.
levelSpecificLoggingIndicates whether Exact Level Logging is needed, default behaviour is Lower Bound Logging.
redirectOutputToIndicates whether a new file needs to be created to capture the Logging, Or syslog should be used.

◆ log()

static void Logger::log ( int32_t  level,
const std::string &  tag,
const std::string &  funcName,
const std::string &  message 
)
static

Responsible for actually Logging a Message to the desired Medium (file or syslog)

Note, this Routine should not be called directly, instead the Macros LOGD, LOGE, LOGI, TYPELOGD and TYPELOGV should be used.


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