diff options
Diffstat (limited to 'src/log.cpp')
-rw-r--r-- | src/log.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/log.cpp b/src/log.cpp index 3d101d29..07eb55f7 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -31,6 +31,10 @@ #include <iostream> #include <sstream> +Logger::Logger(): + mLogToStandardOut(false) +{ +} Logger::~Logger() { @@ -85,6 +89,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; } |