summaryrefslogtreecommitdiff
path: root/src/client/inputhandler.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-10-13 03:57:44 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-14 01:03:54 -0400
commit2139d7d45fb1a8ed250ad96c9975c581f02f72a9 (patch)
tree3e954063710add83723798937637db7c67a254eb /src/client/inputhandler.h
parente0b57c1140554fccbf3e57a036cc4100887ab8f1 (diff)
downloadminetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.tar.gz
minetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.tar.bz2
minetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.zip
Refactor logging
- Add warning log level - Change debug_log_level setting to enumeration string - Map Irrlicht log events to MT log events - Encapsulate log_* functions and global variables into a class, Logger - Unify dstream with standard logging mechanism - Unify core.debug() with standard core.log() script API
Diffstat (limited to 'src/client/inputhandler.h')
-rw-r--r--src/client/inputhandler.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h
index a894e35aa..69e4b25fa 100644
--- a/src/client/inputhandler.h
+++ b/src/client/inputhandler.h
@@ -17,8 +17,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifndef __INPUT_HANDLER_H__
-#define __INPUT_HANDLER_H__
+#ifndef INPUT_HANDLER_H
+#define INPUT_HANDLER_H
#include "irrlichttypes_extrabloated.h"
@@ -86,16 +86,16 @@ public:
}
}
} else if (event.EventType == irr::EET_LOG_TEXT_EVENT) {
- static const enum LogMessageLevel irr_loglev_conv[] = {
- LMT_VERBOSE, // ELL_DEBUG
- LMT_INFO, // ELL_INFORMATION
- LMT_ACTION, // ELL_WARNING
- LMT_ERROR, // ELL_ERROR
- LMT_ERROR, // ELL_NONE
+ static const LogLevel irr_loglev_conv[] = {
+ LL_VERBOSE, // ELL_DEBUG
+ LL_INFO, // ELL_INFORMATION
+ LL_WARNING, // ELL_WARNING
+ LL_ERROR, // ELL_ERROR
+ LL_NONE, // ELL_NONE
};
assert(event.LogEvent.Level < ARRLEN(irr_loglev_conv));
- log_printline(irr_loglev_conv[event.LogEvent.Level],
- std::string("Irrlicht: ") + (const char *)event.LogEvent.Text);
+ g_logger.log(irr_loglev_conv[event.LogEvent.Level],
+ std::string("Irrlicht: ") + (const char*) event.LogEvent.Text);
return true;
}
/* always return false in order to continue processing events */