summaryrefslogtreecommitdiff
path: root/src/logger.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-10 17:58:46 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-10 17:58:46 +0300
commit4ed8030f36a873fdf881f37c6dccbf28029ce22a (patch)
tree935e9b16380da7c781e642e7efb5682128a67887 /src/logger.cpp
parent7d162145958fccfcc3ba32a7db3b8161cfe83fe2 (diff)
downloadmanaverse-4ed8030f36a873fdf881f37c6dccbf28029ce22a.tar.gz
manaverse-4ed8030f36a873fdf881f37c6dccbf28029ce22a.tar.bz2
manaverse-4ed8030f36a873fdf881f37c6dccbf28029ce22a.tar.xz
manaverse-4ed8030f36a873fdf881f37c6dccbf28029ce22a.zip
Add option in settings to enable/disable logging unimplimented packets.
Diffstat (limited to 'src/logger.cpp')
-rw-r--r--src/logger.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/logger.cpp b/src/logger.cpp
index e5b7264cf..e91480f7f 100644
--- a/src/logger.cpp
+++ b/src/logger.cpp
@@ -74,7 +74,8 @@ Logger::Logger() :
mMutex(SDL_CreateMutex()),
mThreadLocked(false),
mLogToStandardOut(true),
- mDebugLog(false)
+ mDebugLog(false),
+ mReportUnimplimented(false)
{
}
@@ -358,6 +359,9 @@ void Logger::error(const std::string &error_text)
void Logger::unimplimented(const int id)
{
+ if (!mReportUnimplimented)
+ return;
+
const std::string str = strprintf("Unimplimented packet: %d", id);
DebugMessageListener::distributeEvent(str);
log(str);