FileLogger.
More...
#include <ored/utilities/log.hpp>
|
| | FileLogger (const std::string &filename) |
| | Constructor.
|
|
virtual | ~FileLogger () |
| | Destructor.
|
| virtual void | log (unsigned, const std::string &) override |
| | The log callback.
|
|
virtual | ~Logger () |
| | Destructor.
|
|
const std::string & | name () |
| | Returns the Logger name.
|
|
|
static const std::string | name |
| | the name "FileLogger"
|
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
◆ 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
-
◆ log()
| virtual void log |
( |
unsigned | , |
|
|
const std::string & | ) |
|
overridevirtual |
The log callback.
Implements Logger.