#include <ored/utilities/log.hpp>
Public Member Functions | |
FileLogger (const std::string &filename) | |
Constructor. More... | |
virtual | ~FileLogger () |
Destructor. More... | |
virtual void | log (unsigned, const std::string &) override |
The log callback. More... | |
Public Member Functions inherited from Logger | |
virtual | ~Logger () |
Destructor. More... | |
virtual void | log (unsigned level, const std::string &s)=0 |
The Log call back function. More... | |
const std::string & | name () |
Returns the Logger name. More... | |
Static Public Attributes | |
static const std::string | name = "FileLogger" |
the name "FileLogger" More... | |
Private Attributes | |
std::string | filename_ |
std::fstream | fout_ |
Additional Inherited Members | |
Protected Member Functions inherited from Logger | |
Logger (const std::string &name) | |
Constructor. More... | |
This logger writes each log message out to the given file. The file is flushed, but not closed, after each log message.
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)
filename | the log filename |
Definition at line 84 of file log.cpp.
|
virtual |
|
overridevirtual |
|
static |