Logo
Reference manual - version ored_version
Public Member Functions | Protected Member Functions | List of all members
Logger Class Referenceabstract

The Base Custom Log Handler class. More...

#include <ored/utilities/log.hpp>

+ Inheritance diagram for Logger:

Public Member Functions

virtual ~Logger ()
 Destructor.
 
virtual void log (unsigned level, const std::string &s)=0
 The Log call back function. More...
 
const std::string & name ()
 Returns the Logger name.
 

Protected Member Functions

 Logger (const std::string &name)
 Constructor. More...
 

Detailed Description

The Base Custom Log Handler class.

This base log handler class can be used to define your own custom handler and then registered with the Log class. Once registered it will receive all log messages as soon as they occur via it's log() method

See also
Log

Constructor & Destructor Documentation

◆ Logger()

Logger ( const std::string &  name)
protected

Constructor.

Implementations must provide a logger name

Parameters
namethe logger name

Member Function Documentation

◆ log()

virtual void log ( unsigned  level,
const std::string &  s 
)
pure virtual

The Log call back function.

This function will be called every time a log message is produced.

Parameters
levelthe log level
sthe log message

Implemented in BufferLogger, FileLogger, FilteredBufferedLogger, and StderrLogger.