MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mic::logger Namespace Reference

Contains classes, types and defines used for dynamic, multilevel logging. More...

Classes

class  ConsoleOutput
 Class responsible for printing logs on console. More...
 
class  Logger
 Logger - defined in the form of a singleton, with double-checked locking pattern (DCLP) based access to instance. More...
 
class  LoggerOutput
 Abstract interface for different logger outputs. More...
 
class  ScopeLogger
 Small class used to prepare line for logger. Object created only for the purpose of parsing the ostringstream, during the macro LOG call. More...
 

Enumerations

enum  Severity_t {
  Trace = 0, Debug, Notice, Info,
  Status, Warning, Error, Fatal
}
 Message severity level. More...
 

Functions

std::ostream & blue (std::ostream &s)
 
std::ostream & green (std::ostream &s)
 
std::ostream & red (std::ostream &s)
 
std::ostream & white (std::ostream &s)
 
std::ostream & yellow (std::ostream &s)
 
std::ostream & magenta (std::ostream &s)
 
std::ostream & cyan (std::ostream &s)
 
std::ostream & reset (std::ostream &s)
 
std::ostream & intense (std::ostream &s)
 
std::string sev2str (Severity_t sev_)
 

Detailed Description

Contains classes, types and defines used for dynamic, multilevel logging.

Author
tkornuta

Enumeration Type Documentation

Message severity level.

Author
tkornuta
Enumerator
Trace 

Trace program execution, prints file name and line, typically logged when entering function.

Debug 

Debug message with file and line number, contain user defined debug information.

Notice 

Information, contain user defined information, with small importance.

Info 

Information, contain user defined information.

Status 

Status, contains statuses such as status of application, phase of operation etc.

Warning 

Warning, continue execution.

Error 

Something bad happened, try to terminate.

Fatal 

Something very bad happened, no chance to continue execution.

Definition at line 35 of file LoggerAux.hpp.

Function Documentation

std::ostream& mic::logger::blue ( std::ostream &  s)
inline

Set console font color to blue.

Definition at line 45 of file ConsoleOutput.hpp.

std::ostream& mic::logger::cyan ( std::ostream &  s)
inline

Set console font color to cyan.

Definition at line 135 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().

std::ostream& mic::logger::green ( std::ostream &  s)
inline

Set console font color to green.

Definition at line 60 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().

std::ostream& mic::logger::intense ( std::ostream &  s)
inline

Intense console font color.

Definition at line 165 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().

std::ostream& mic::logger::magenta ( std::ostream &  s)
inline

Set console font color to magenta.

Definition at line 120 of file ConsoleOutput.hpp.

std::ostream& mic::logger::red ( std::ostream &  s)
inline

Set console font color to red.

Definition at line 75 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().

std::ostream& mic::logger::reset ( std::ostream &  s)
inline

Reset console colors (ie. font color white, background color black).

Definition at line 150 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().

std::string mic::logger::sev2str ( Severity_t  sev_)

Returns string representing the severity level.

Definition at line 30 of file LoggerAux.cpp.

References Debug, Error, Fatal, Info, Notice, Status, Trace, and Warning.

Referenced by mic::logger::ConsoleOutput::print().

std::ostream& mic::logger::white ( std::ostream &  s)
inline

Set console font color to white.

Definition at line 90 of file ConsoleOutput.hpp.

std::ostream& mic::logger::yellow ( std::ostream &  s)
inline

Set console font color to yellow.

Definition at line 105 of file ConsoleOutput.hpp.

Referenced by mic::logger::ConsoleOutput::print().