diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-25 21:36:37 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-07-25 21:36:37 +0000 |
commit | e6d8d2dd8eff63c23f0ffad25c5e2529bde93485 (patch) | |
tree | cce9c591350ce1d29c67df3339c526b182e8763e /src/log.h | |
parent | 33e19fb0822308a630ca6e1122b9b97882a120a7 (diff) | |
download | mana-e6d8d2dd8eff63c23f0ffad25c5e2529bde93485.tar.gz mana-e6d8d2dd8eff63c23f0ffad25c5e2529bde93485.tar.bz2 mana-e6d8d2dd8eff63c23f0ffad25c5e2529bde93485.tar.xz mana-e6d8d2dd8eff63c23f0ffad25c5e2529bde93485.zip |
Added support for writing log to standard output.
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; |