File output logger.
More...
#include <Logger.h>
File output logger.
Definition at line 160 of file Logger.h.
◆ Options
Enumerator |
---|
KEEP_OPENED | Opens the associated file when the logger is constructed and closes it in destructor. This is the default behavior of the logger, nevertheless this option can be explicitly specified to increase readability of the code.
|
OPEN_WHEN_WRITING | Open the file only for writing and close it immediately afterwards. If the file cannot be opened, the message is not written into the log without throwing any exception. This option implies appending to existing content.
|
APPEND | If the file already exists, the new messages are appended to existing content instead of erasing the file.
|
ADD_TIMESTAMP | Adds a time of writing before each message.
|
Definition at line 162 of file Logger.h.
◆ FileLogger()
◆ ~FileLogger()
FileLogger::~FileLogger |
( |
| ) |
|
|
default |
◆ writeString()
void FileLogger::writeString |
( |
const std::string & |
s | ) |
|
|
overridevirtual |
Logs a string message.
- Todo:
- different types (log, warning, error, ...) and levels of verbosity
Implements ILogger.
Definition at line 56 of file Logger.cpp.
The documentation for this class was generated from the following files:
- /home/pavel/projects/astro/sph/src/core/io/Logger.h
- /home/pavel/projects/astro/sph/src/core/io/Logger.cpp