FiReS  0.2.0
FiReS - Filter, Retrieval and Search
fires::Log Class Reference

Static class to log output. More...

#include <Log.h>

+ Collaboration diagram for fires::Log:

Static Public Member Functions

static void setLogLevel (const TLogLevel logLevel)
 Set current log level. More...
 
static TLogLevel logLevel (void)
 Get current log level. More...
 
static void setStream (std::ostream &stream)
 Set current output stream. More...
 
static const std::ostream & stream (void)
 Get current output stream. More...
 
static void log (const std::string &msg, const TLogLevel level=LOG_LEVEL_VERBOSE)
 Method to log out a message in a specific level. More...
 
static void log (const std::string &msg, std::ostream &stream, const TLogLevel level=LOG_LEVEL_VERBOSE)
 Method to log out a message in a specific level to a specific stream. More...
 

Static Protected Attributes

static TLogLevel _logLevel
 Current log level. This can be overwritten with proper value assigned to environment variable FIRES_LOG_LEVEL.
 
static std::ostream * _stream
 Current stream to write log to.
 

Detailed Description

Static class to log output.

Definition at line 44 of file Log.h.

Member Function Documentation

static void fires::Log::log ( const std::string &  msg,
const TLogLevel  level = LOG_LEVEL_VERBOSE 
)
static

Method to log out a message in a specific level.

Parameters
msgmessage to log
levellevel of the message
static void fires::Log::log ( const std::string &  msg,
std::ostream &  stream,
const TLogLevel  level = LOG_LEVEL_VERBOSE 
)
static

Method to log out a message in a specific level to a specific stream.

Parameters
msgmessage to log
levellevel of the message
streamstream where log will be written
static TLogLevel fires::Log::logLevel ( void  )
static

Get current log level.

Returns
current log level
static void fires::Log::setLogLevel ( const TLogLevel  logLevel)
static

Set current log level.

Parameters
logLevellevel to be set
static void fires::Log::setStream ( std::ostream &  stream)
static

Set current output stream.

Parameters
streamoutput stream to be set
static const std::ostream& fires::Log::stream ( void  )
static

Get current output stream.

Returns
current output stream

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