summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-11-09 17:59:14 +0300
committerAndrei Karas <akaras@inbox.ru>2013-11-09 17:59:14 +0300
commitdb1e60556c72b1b87ff2a384c556ccca724c46d6 (patch)
tree22a5f4e9c4f436ef8e746e0a2d688de80c1597a6 /src/logger.cpp
parentc2bb49be52a92deccec7428b6859242688fc8987 (diff)
parent1716861f0ee2f7a3714c5b44bb0f017c3d8d3b2c (diff)
downloadplus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.gz
plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.bz2
plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.tar.xz
plus-db1e60556c72b1b87ff2a384c556ccca724c46d6.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index 12a51070d..972d333e4 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -25,8 +25,6 @@
#include <iostream>
#include <sstream>
-#include "gui/widgets/tabs/chattab.h"
-
#ifdef WIN32
#include <windows.h>
#elif defined __APPLE__
@@ -62,10 +60,11 @@
<< static_cast<int>((tv.tv_usec / 10000) % 100) \
<< "] ";
+Logger *logger = nullptr; // Log object
+
Logger::Logger() :
mLogFile(),
mLogToStandardOut(true),
- mChatWindow(nullptr),
mDebugLog(false)
{
}
@@ -95,6 +94,7 @@ void Logger::log(const std::string &str)
log("%s", str.c_str());
}
+#ifdef ENABLEDEBUGLOG
void Logger::dlog(const std::string &str)
{
if (!mDebugLog)
@@ -114,10 +114,8 @@ void Logger::dlog(const std::string &str)
if (mLogToStandardOut)
std::cout << timeStr.str() << str << std::endl;
-
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(str, BY_LOGGER);
}
+#endif
void Logger::log1(const char *const buf)
{
@@ -135,9 +133,6 @@ void Logger::log1(const char *const buf)
if (mLogToStandardOut)
std::cout << timeStr.str() << buf << std::endl;
-
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(buf, BY_LOGGER);
}
void Logger::log(const char *const log_text, ...)
@@ -170,9 +165,6 @@ void Logger::log(const char *const log_text, ...)
if (mLogToStandardOut)
std::cout << timeStr.str() << buf << std::endl;
- if (mChatWindow && debugChatTab)
- debugChatTab->chatLog(buf, BY_LOGGER);
-
// Delete temporary buffer
delete [] buf;
}