summaryrefslogtreecommitdiff
path: root/src/utils/logger.h
diff options
context:
space:
mode:
authorHuynh Tran <nthuynh75@gmail.com>2005-06-19 09:05:46 +0000
committerHuynh Tran <nthuynh75@gmail.com>2005-06-19 09:05:46 +0000
commitf625c74501185e0ce8064ea704efc2eaeaf44e19 (patch)
tree2bf33c33e30ffac17ac62f4f60f4129aa039203a /src/utils/logger.h
parent8b9ecdf0b86890d34bab10e79a1ba46dcccd894e (diff)
downloadmanaserv-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.h12
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 */
};