summaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-07-25 21:36:37 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-07-25 21:36:37 +0000
commite6d8d2dd8eff63c23f0ffad25c5e2529bde93485 (patch)
treecce9c591350ce1d29c67df3339c526b182e8763e /src/log.h
parent33e19fb0822308a630ca6e1122b9b97882a120a7 (diff)
downloadmana-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.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/log.h b/src/log.h
index 4876a9aa..36328527 100644
--- a/src/log.h
+++ b/src/log.h
@@ -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;