Logo
Reference manual - version ored_version
FileLogger Class Reference

FileLogger. More...

#include <ored/utilities/log.hpp>

Inheritance diagram for FileLogger:

Public Member Functions

 FileLogger (const std::string &filename)
 Constructor.
virtual ~FileLogger ()
 Destructor.
virtual void log (unsigned, const std::string &) override
 The log callback.
Public Member Functions inherited from Logger
virtual ~Logger ()
 Destructor.
const std::string & name ()
 Returns the Logger name.

Static Public Attributes

static const std::string name
 the name "FileLogger"

Additional Inherited Members

Protected Member Functions inherited from Logger
 Logger (const std::string &name)
 Constructor.

Detailed Description

FileLogger.

This logger writes each log message out to the given file. The file is flushed, but not closed, after each log message.

See also
Log

Constructor & Destructor Documentation

◆ FileLogger()

FileLogger ( const std::string & filename)

Constructor.

Construct a file logger using the given filename, this filename is passed to std::fostream::open() and this constructor will throw an exception if the file is not opened (e.g. if the filename is invalid)

Parameters
filenamethe log filename

Member Function Documentation

◆ log()

virtual void log ( unsigned ,
const std::string &  )
overridevirtual

The log callback.

Implements Logger.