summaryrefslogtreecommitdiffstats
path: root/src/MCLogger.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-01 09:32:14 +0200
committermadmaxoft <github@xoft.cz>2014-04-01 09:32:14 +0200
commit7aa6a3b86663ef28295ffb914f66a8f0359a353f (patch)
tree13285d8d715722e89c5eb61b40b0550b82858c4b /src/MCLogger.cpp
parentAPIDump: Documented the cCompositeChat support in logging functions. (diff)
downloadcuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.gz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.bz2
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.lz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.xz
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.tar.zst
cuberite-7aa6a3b86663ef28295ffb914f66a8f0359a353f.zip
Diffstat (limited to '')
-rw-r--r--src/MCLogger.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/MCLogger.cpp b/src/MCLogger.cpp
index 4f3e5dc0f..509833f37 100644
--- a/src/MCLogger.cpp
+++ b/src/MCLogger.cpp
@@ -93,25 +93,35 @@ void cMCLogger::InitLog(const AString & a_FileName)
-void cMCLogger::LogSimple(const char* a_Text, int a_LogType /* = 0 */ )
+void cMCLogger::LogSimple(const char * a_Text, eLogLevel a_LogLevel)
{
- switch( a_LogType )
+ switch (a_LogLevel)
{
- case 0:
+ case llRegular:
+ {
LOG("%s", a_Text);
break;
- case 1:
+ }
+ case llInfo:
+ {
LOGINFO("%s", a_Text);
break;
- case 2:
+ }
+ case llWarning:
+ {
LOGWARN("%s", a_Text);
break;
- case 3:
+ }
+ case llError:
+ {
LOGERROR("%s", a_Text);
break;
+ }
default:
- LOG("(#%d#: %s", a_LogType, a_Text);
+ {
+ LOG("(#%d#: %s", (int)a_LogLevel, a_Text);
break;
+ }
}
}