]> git.lizzy.rs Git - minetest.git/blobdiff - src/log.h
Typo fix in networkprotocol.h
[minetest.git] / src / log.h
index 5c9bb1b262fbde3a0e3c9c8bf11828e931bd4f9c..6240e34ed009ee6df24b8b4182b6c59416173a69 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -1,6 +1,6 @@
 /*
 Minetest
-Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
@@ -24,7 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 /*
        Use this for logging everything.
-       
+
        If you need to explicitly print something, use dstream or cout or cerr.
 */
 
@@ -39,18 +39,25 @@ enum LogMessageLevel {
 class ILogOutput
 {
 public:
+       ILogOutput() :
+               silence(false)
+       {}
+
        /* 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){};
+
+       bool silence;
 };
 
 void log_add_output(ILogOutput *out, enum LogMessageLevel lev);
 void log_add_output_maxlev(ILogOutput *out, enum LogMessageLevel lev);
 void log_add_output_all_levs(ILogOutput *out);
 void log_remove_output(ILogOutput *out);
+void log_set_lev_silence(enum LogMessageLevel lev, bool silence);
 
 void log_register_thread(const std::string &name);
 void log_deregister_thread();