summaryrefslogtreecommitdiff
path: root/src/log.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <tmw@crushnet.org>2007-12-10 02:50:15 +0000
committerPhilipp Sehmisch <tmw@crushnet.org>2007-12-10 02:50:15 +0000
commit2820f4d4329f29fc75c85d6b2195fd42b97fd457 (patch)
tree2e48985cf1fddad7b37afcc3eefaeb75ed1d1ee3 /src/log.cpp
parente961be5bfd29ad3f44f948828981cb3ab07f25a7 (diff)
downloadmana-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.gz
mana-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.bz2
mana-2820f4d4329f29fc75c85d6b2195fd42b97fd457.tar.xz
mana-2820f4d4329f29fc75c85d6b2195fd42b97fd457.zip
Added an option to show log messages in the chat console.
Diffstat (limited to 'src/log.cpp')
-rw-r--r--src/log.cpp10
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;
}