diff options
Diffstat (limited to 'src/log.h')
-rw-r--r-- | src/log.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -25,6 +25,8 @@ #include <iosfwd> #include <fstream> +class ChatWindow; + /** * The Log Class : Useful to write debug or info messages */ @@ -52,6 +54,11 @@ 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, ...); @@ -65,6 +72,7 @@ class Logger private: std::ofstream mLogFile; bool mLogToStandardOut; + ChatWindow *mChatWindow; }; extern Logger *logger; |