diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-08-15 20:56:08 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-08-15 22:44:13 -0400 |
commit | 560877d89847b25b201580e083119f0b23ff75c1 (patch) | |
tree | cb50dd12b0b884f7c7dea74102d321d63bb1d37f /src | |
parent | 8f573b6c425dc82be42ad80eae565b0641a90a3b (diff) | |
download | mana-560877d89847b25b201580e083119f0b23ff75c1.tar.gz mana-560877d89847b25b201580e083119f0b23ff75c1.tar.bz2 mana-560877d89847b25b201580e083119f0b23ff75c1.tar.xz mana-560877d89847b25b201580e083119f0b23ff75c1.zip |
Remove the logToChat option
This is a very old legacy option. Today its not very
useful because the logger had become quite verbose that
using it during run-time is not helpful.
Reviewed-By: Jared Adams
Reviewed-By: Freeyorp
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 6 | ||||
-rw-r--r-- | src/log.cpp | 13 | ||||
-rw-r--r-- | src/log.h | 8 | ||||
-rw-r--r-- | src/utils/xml.cpp | 2 |
4 files changed, 5 insertions, 24 deletions
diff --git a/src/game.cpp b/src/game.cpp index 18bad69c..8d6440b7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -172,11 +172,6 @@ static void createGuiWindows() localChatTab = new ChatTab(_("General")); - if (config.getValue("logToChat", 0)) - { - logger->setChatWindow(chatWindow); - } - NpcDialog::setup(); Mana::Event::trigger("Game", "GuiWindowsLoaded"); @@ -191,7 +186,6 @@ static void destroyGuiWindows() { Mana::Event::trigger("Game", "GuiWindowsUnloading"); - logger->setChatWindow(NULL); del_0(localChatTab) // Need to do this first, so it can remove itself del_0(chatWindow) del_0(statusWindow) diff --git a/src/log.cpp b/src/log.cpp index 435b2da0..0da9a272 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -22,9 +22,10 @@ #include <iostream> #include <sstream> -#include "log.h" +#include <stdio.h> +#include <stdarg.h> -#include "gui/widgets/chattab.h" +#include "log.h" #ifdef WIN32 #include <windows.h> @@ -37,8 +38,7 @@ #include <sys/time.h> Logger::Logger(): - mLogToStandardOut(true), - mChatWindow(NULL) + mLogToStandardOut(true) { } @@ -101,11 +101,6 @@ void Logger::log(const char *log_text, ...) std::cout << timeStr.str() << buf << std::endl; } - if (mChatWindow) - { - localChatTab->chatLog(buf, BY_LOGGER); - } - // Delete temporary buffer delete[] buf; } @@ -24,8 +24,6 @@ #include <fstream> -class ChatWindow; - /** * The Log Class : Useful to write debug or info messages */ @@ -53,11 +51,6 @@ class Logger void setLogToStandardOut(bool value) { mLogToStandardOut = value; } /** - * Enables logging to chat window - */ - void setChatWindow(ChatWindow *window) { mChatWindow = window; } - - /** * Enters a message in the log. The message will be timestamped. */ void log(const char *log_text, ...) @@ -75,7 +68,6 @@ class Logger private: std::ofstream mLogFile; bool mLogToStandardOut; - ChatWindow *mChatWindow; }; extern Logger *logger; diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index bb386f51..2bcb6f24 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -162,7 +162,7 @@ namespace XML logger->log("Error in unknown xml file on line %d", error->line); - logger->log(error->message); + logger->log("%s", error->message); // No need to keep errors around xmlCtxtResetLastError(error->ctxt); |