From 2820f4d4329f29fc75c85d6b2195fd42b97fd457 Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Mon, 10 Dec 2007 02:50:15 +0000 Subject: Added an option to show log messages in the chat console. --- src/log.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/log.cpp') 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; } -- cgit v1.2.3-60-g2f50