OS  v1.7.5
Documentation
Loading...
Searching...
No Matches
Logger

API interfaces to print out logging messages. More...

Namespaces

namespace  qOS::logger
 Logger interfaces.
 

Classes

class  qOS::logger
 The global class to output logging streams. Its usage requires the static method: logger::out() More...
 
class  qOS::logger::mem
 Class that sets the number of bytes to be logged when a pointer is being used after. Example: More...
 
class  qOS::logger::pre
 Class that sets the decimal precision to be used to format floating-point values on logger operations. Example: More...
 

Enumerations

enum  qOS::logger::logSeverity {
  qOS::logger::none , qOS::logger::fatal , qOS::logger::error , qOS::logger::warning ,
  qOS::logger::info , qOS::logger::debug , qOS::logger::verbose
}
 

Functions

void qOS::logger::setOutputFcn (util::putChar_t fcn)
 Set the output method for the logger stream.
 

Variables

const lout_base qOS::logger::dec
 Modifies the default numeric base to decimal for integer logger output Example:
 
const lout_base qOS::logger::hex
 Modifies the default numeric base to hexadecimal for integer logger output Example:
 
const lout_base qOS::logger::oct
 Modifies the default numeric base to octal for integer logger output Example:
 
const lout_base qOS::logger::bin
 Modifies the default numeric base to binary for integer logger output Example:
 
const char *const qOS::logger::endl
 Inserts a new-line character to the logger output. Example:
 
const char *const qOS::logger::end
 Inserts a new-line character to the logger output and restore the default color Example:
 
const char *const qOS::logger::nrm
 Set colored output to "normal" after the usage of this statement Example:
 
const char *const qOS::logger::red
 Set colored output to "red" after the usage of this statement Example:
 
const char *const qOS::logger::grn
 Set colored output to "green" after the usage of this statement Example:
 
const char *const qOS::logger::yel
 Set colored output to "yellow" after the usage of this statement Example:
 
const char *const qOS::logger::blu
 Set colored output to "blue" after the usage of this statement Example:
 
const char *const qOS::logger::mag
 Set colored output to "magenta" after the usage of this statement Example:
 
const char *const qOS::logger::cyn
 Set colored output to "cyan" after the usage of this statement Example:
 
const char *const qOS::logger::wht
 Set colored output to "white" after the usage of this statement Example:
 

Detailed Description

API interfaces to print out logging messages.

Enumeration Type Documentation

◆ logSeverity

enum qOS::logger::logSeverity
Enumerator
none 
fatal 
error 
warning 
info 
debug 
verbose 

Function Documentation

◆ setOutputFcn()

void qOS::logger::setOutputFcn ( util::putChar_t fcn)

Set the output method for the logger stream.

Parameters
[in]fcnThe basic output byte function.

Variable Documentation

◆ bin

const lout_base qOS::logger::bin

Modifies the default numeric base to binary for integer logger output Example:

uint16_t myNumber = 1000;
logger::out() << logger::bin << myNumber << logger::endl;

◆ blu

const char* const qOS::logger::blu

Set colored output to "blue" after the usage of this statement Example:

logger::out() << logger::blu <<"blue colored!" << logger::end;

◆ cyn

const char* const qOS::logger::cyn

Set colored output to "cyan" after the usage of this statement Example:

logger::out() << logger::cyn <<"cyan colored!" << logger::end;

◆ dec

const lout_base qOS::logger::dec

Modifies the default numeric base to decimal for integer logger output Example:

uint16_t myNumber = 1000;
logger::out() << logger::dec << myNumber << logger::endl;

◆ end

const char* const qOS::logger::end

Inserts a new-line character to the logger output and restore the default color Example:

logger::out() << "hello world!" << logger::end;

◆ endl

const char* const qOS::logger::endl

Inserts a new-line character to the logger output. Example:

logger::out() << "hello world!" << logger::endl;

◆ grn

const char* const qOS::logger::grn

Set colored output to "green" after the usage of this statement Example:

logger::out() << logger::grn <<"green colored!" << logger::end;

◆ hex

const lout_base qOS::logger::hex

Modifies the default numeric base to hexadecimal for integer logger output Example:

uint16_t myNumber = 1000;
logger::out() << logger::hex << myNumber << logger::endl;

◆ mag

const char* const qOS::logger::mag

Set colored output to "magenta" after the usage of this statement Example:

logger::out() << logger::mag <<"magenta colored!" << logger::end;

◆ nrm

const char* const qOS::logger::nrm

Set colored output to "normal" after the usage of this statement Example:

logger::out() << logger::nrm <<"normal colored!" << logger::end;

◆ oct

const lout_base qOS::logger::oct

Modifies the default numeric base to octal for integer logger output Example:

uint16_t myNumber = 1000;
logger::out() << logger::oct << myNumber << logger::endl;

◆ red

const char* const qOS::logger::red

Set colored output to "red" after the usage of this statement Example:

logger::out() << logger::red <<"red colored!" << logger::end;

◆ wht

const char* const qOS::logger::wht

Set colored output to "white" after the usage of this statement Example:

logger::out() << logger::wht <<"white colored!" << logger::end;

◆ yel

const char* const qOS::logger::yel

Set colored output to "yellow" after the usage of this statement Example:

logger::out() << logger::yel <<"yellow colored!" << logger::end;