From: Perttu Ahola Date: Sun, 27 Nov 2011 12:28:54 +0000 (+0200) Subject: Add a third log output interface method X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=013921782b1a8506f4aee1d1be0312002eddd575;p=zefram%2Fminetest%2Fminetest_engine.git Add a third log output interface method --- diff --git a/src/log.cpp b/src/log.cpp index 188b9b67..57983109 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -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); } } diff --git a/src/log.h b/src/log.h index 1d087429..afbce57e 100644 --- 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){}; };