diff options
Diffstat (limited to 'src/log.h')
-rw-r--r-- | src/log.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -32,6 +32,11 @@ class Logger { public: /** + * Constructor. + */ + Logger(); + + /** * Destructor, closes log file. */ ~Logger(); @@ -42,6 +47,11 @@ class Logger void setLogFile(const std::string &logFilename); /** + * Sets whether the log should be written to standard output. + */ + void setLogToStandardOut(bool value) { mLogToStandardOut = value; } + + /** * Enters a message in the log. The message will be timestamped. */ void log(const char *log_text, ...); @@ -54,6 +64,7 @@ class Logger private: std::ofstream mLogFile; + bool mLogToStandardOut; }; extern Logger *logger; |