diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-12-10 02:50:15 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-12-10 02:50:15 +0000 |
commit | 2820f4d4329f29fc75c85d6b2195fd42b97fd457 (patch) | |
tree | 2e48985cf1fddad7b37afcc3eefaeb75ed1d1ee3 /src/log.cpp | |
parent | e961be5bfd29ad3f44f948828981cb3ab07f25a7 (diff) | |
download | mana-client-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.gz mana-client-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.bz2 mana-client-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.xz mana-client-2820f4d4329f29fc75c85d6b2195fd42b97fd457.zip |
Added an option to show log messages in the chat console.
Diffstat (limited to 'src/log.cpp')
-rw-r--r-- | src/log.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/log.cpp b/src/log.cpp index 63a34776..96630a96 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -34,8 +34,11 @@ #include "log.h" +#include "gui/chat.h" + Logger::Logger(): - mLogToStandardOut(false) + mLogToStandardOut(false), + mChatWindow(NULL) { } @@ -100,6 +103,11 @@ void Logger::log(const char *log_text, ...) std::cout << timeStr.str() << buf << std::endl; } + if (mChatWindow) + { + mChatWindow->chatLog(buf, BY_LOGGER); + } + // Delete temporary buffer delete[] buf; } |