diff options
author | Huynh Tran <nthuynh75@gmail.com> | 2005-06-19 09:05:46 +0000 |
---|---|---|
committer | Huynh Tran <nthuynh75@gmail.com> | 2005-06-19 09:05:46 +0000 |
commit | f625c74501185e0ce8064ea704efc2eaeaf44e19 (patch) | |
tree | 2bf33c33e30ffac17ac62f4f60f4129aa039203a /src/utils/logger.h | |
parent | 8b9ecdf0b86890d34bab10e79a1ba46dcccd894e (diff) | |
download | manaserv-f625c74501185e0ce8064ea704efc2eaeaf44e19.tar.gz manaserv-f625c74501185e0ce8064ea704efc2eaeaf44e19.tar.bz2 manaserv-f625c74501185e0ce8064ea704efc2eaeaf44e19.tar.xz manaserv-f625c74501185e0ce8064ea704efc2eaeaf44e19.zip |
Added tee mode to Logger.
Diffstat (limited to 'src/utils/logger.h')
-rw-r--r-- | src/utils/logger.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utils/logger.h b/src/utils/logger.h index be8d7d3e..bdfa905e 100644 --- a/src/utils/logger.h +++ b/src/utils/logger.h @@ -120,6 +120,17 @@ class Logger: public Singleton<Logger> /** + * Set tee mode. + * + * @param flag if true, write messages to both the standard (or error) + * output and the log file (if set) (default = false). + */ + void + setTeeMode(bool flag = false) + throw(); + + + /** * Log a generic message. * * @param msg the message to log. @@ -240,6 +251,7 @@ class Logger: public Singleton<Logger> private: std::ofstream mLogFile; /**< the log file */ bool mHasTimestamp; /**< the timestamp flag */ + bool mTeeMode; /**< the tee mode flag */ }; |