summaryrefslogtreecommitdiff
path: root/src/log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/log.cpp b/src/log.cpp
index 0d54a368..224736bd 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -35,6 +35,10 @@
#include <iostream>
#include <sstream>
+Logger::Logger():
+ mLogToStandardOut(false)
+{
+}
Logger::~Logger()
{
@@ -92,6 +96,11 @@ void Logger::log(const char *log_text, ...)
mLogFile << timeStr.str() << buf << std::endl;
+ if (mLogToStandardOut)
+ {
+ std::cout << timeStr.str() << buf << std::endl;
+ }
+
// Delete temporary buffer
delete[] buf;
}