Valkka  1.6.1
OpenSource Video Management
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Logger Struct Reference

Logging facility. More...

#include <logging.h>

Public Types

typedef Logger &(* LoggerManipulator) (Logger &)
 
typedef std::basic_ostream< char, std::char_traits< char > > CoutType
 
typedef CoutType &(* StandardEndLine) (CoutType &)
 

Public Member Functions

 Logger (int log_level=LogLevel::normal)
 
template<typename T >
Loggeroperator<< (const T &x)
 
void setLevel (int level)
 
Loggerlog (int level)
 
Loggeroperator<< (LoggerManipulator manip)
 
Loggeroperator<< (StandardEndLine manip)
 

Static Public Member Functions

static Loggerendl (Logger &stream)
 

Public Attributes

int log_level
 
int current_level
 

Detailed Description

Logging facility.

logger.log(LogLevel::crazy) << a << b << c << etc. gets evaluated as:

( ( (logger.log(LogLevel::crazy)) << a) << b ) << c )

so first, logger.log(LogLevel::crazy) returns an object that consumers a, which returns an object that consumes b, etc.

For extremely frequent logging, just use std::cout encapsulated inside preprocessor statements


The documentation for this struct was generated from the following files: