MachineIntelligenceCore:Toolchain
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mic::logger::LoggerOutput Class Referenceabstract

Abstract interface for different logger outputs. More...

#include <LoggerOutput.hpp>

Inheritance diagram for mic::logger::LoggerOutput:

Public Member Functions

 LoggerOutput (Severity_t sev=LINFO)
 
virtual ~LoggerOutput ()
 
virtual void print (const std::string &msg_, Severity_t severity_, const std::string &file_, int line_) const =0
 Logs given message. Depending on actual implementation, it can be printed on terminal, ncurses window, file etc. More...
 
void setLvl (Severity_t sev)
 
void incrementLvl ()
 
void decrementLvl ()
 
Severity_t getLvl () const
 

Protected Attributes

Severity_t lvl
 

Detailed Description

Abstract interface for different logger outputs.

Definition at line 36 of file LoggerOutput.hpp.

Constructor & Destructor Documentation

mic::logger::LoggerOutput::LoggerOutput ( Severity_t  sev = LINFO)
inline

Constructor. Sets default severity level (LINFO as default).

Parameters
sevDefault output severity level.

Definition at line 42 of file LoggerOutput.hpp.

virtual mic::logger::LoggerOutput::~LoggerOutput ( )
inlinevirtual

Virtual destructor. Empty.

Definition at line 50 of file LoggerOutput.hpp.

Member Function Documentation

void mic::logger::LoggerOutput::decrementLvl ( )
inline

Decrements severity level.

Definition at line 83 of file LoggerOutput.hpp.

References LTRACE, and lvl.

Referenced by mic::logger::Logger::decrementSeverityLevel().

Severity_t mic::logger::LoggerOutput::getLvl ( ) const
inline

Returns severity level.

Returns
Severity level

Definition at line 93 of file LoggerOutput.hpp.

References lvl.

Referenced by mic::logger::Logger::log().

void mic::logger::LoggerOutput::incrementLvl ( )
inline

Increments severity level.

Definition at line 75 of file LoggerOutput.hpp.

References LFATAL, and lvl.

Referenced by mic::logger::Logger::incrementSeverityLevel().

virtual void mic::logger::LoggerOutput::print ( const std::string &  msg_,
Severity_t  severity_,
const std::string &  file_,
int  line_ 
) const
pure virtual

Logs given message. Depending on actual implementation, it can be printed on terminal, ncurses window, file etc.

Parameters
msg_Message to log
severity_Severity of message
file_Name of file, from which log was called
line_Number of line, from which log was called

Implemented in mic::logger::ConsoleOutput.

Referenced by mic::logger::Logger::log().

void mic::logger::LoggerOutput::setLvl ( Severity_t  sev)
inline

Sets severity level.

Parameters
sevSeverity level.

Definition at line 68 of file LoggerOutput.hpp.

References lvl.

Referenced by main(), and mic::logger::Logger::setSeverityLevel().

Member Data Documentation

Severity_t mic::logger::LoggerOutput::lvl
protected

Logger severity - messages below this level will not be printed.

Definition at line 101 of file LoggerOutput.hpp.

Referenced by decrementLvl(), getLvl(), incrementLvl(), and setLvl().


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