Logo
Reference manual - version ored_version
Public Member Functions | Static Public Attributes | List of all members
FileLogger Class Reference

FileLogger. More...

#include <ored/utilities/log.hpp>

+ Inheritance diagram for FileLogger:

Public Member Functions

 FileLogger (const std::string &filename)
 Constructor. More...
 
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. More...
 

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