Add a third log output interface method
authorPerttu Ahola <celeron55@gmail.com>
Sun, 27 Nov 2011 12:28:54 +0000 (14:28 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:56 +0000 (19:13 +0200)
src/log.cpp
src/log.h

index 188b9b679e9c930f552bd1fbeadbfc4f423fb3ab..5798310962016ce7b42c46018030bfc8e59908ca 100644 (file)
@@ -100,6 +100,7 @@ void log_printline(enum LogMessageLevel lev, const std::string &text)
                        i != log_outputs[lev].end(); i++){
                ILogOutput *out = *i;
                out->printLog(os.str());
+               out->printLog(os.str(), lev);
                out->printLog(lev, text);
        }
 }
index 1d087429cd09f04ecaedfa33096a10ca6177a5fe..afbce57e92f541863cc3bd5ad20a756d2facd301 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -41,6 +41,8 @@ class ILogOutput
 public:
        /* line: Full line with timestamp, level and thread */
        virtual void printLog(const std::string &line){};
+       /* line: Full line with timestamp, level and thread */
+       virtual void printLog(const std::string &line, enum LogMessageLevel lev){};
        /* line: Only actual printed text */
        virtual void printLog(enum LogMessageLevel lev, const std::string &line){};
 };