summaryrefslogtreecommitdiffstats
path: root/src/MCLogger.h
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.h
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 'src/MCLogger.h')
-rw-r--r--src/MCLogger.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/MCLogger.h b/src/MCLogger.h
index 996e60329..c0150c124 100644
--- a/src/MCLogger.h
+++ b/src/MCLogger.h
@@ -10,25 +10,36 @@ class cLog;
-class cMCLogger // tolua_export
-{ // tolua_export
-public: // tolua_export
- /// Creates a logger with the default filename, "logs/LOG_<timestamp>.log"
+// tolua_begin
+class cMCLogger
+{
+public:
+ enum eLogLevel
+ {
+ llRegular,
+ llInfo,
+ llWarning,
+ llError,
+ };
+ // tolua_end
+
+ /** Creates a logger with the default filename, "logs/LOG_<timestamp>.log" */
cMCLogger(void);
- /// Creates a logger with the specified filename inside "logs" folder
+ /** Creates a logger with the specified filename inside "logs" folder */
cMCLogger(const AString & a_FileName); // tolua_export
~cMCLogger(); // tolua_export
- void Log(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
- void Info(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
- void Warn(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
- void Error(const char* a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
+ void Log (const char * a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
+ void Info (const char * a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
+ void Warn (const char * a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
+ void Error(const char * a_Format, va_list a_ArgList) FORMATSTRING(2, 0);
- void LogSimple(const char* a_Text, int a_LogType = 0 ); // tolua_export
+ /** Logs the simple text message at the specified log level. */
+ void LogSimple(const char * a_Text, eLogLevel a_LogLevel = llRegular); // tolua_export
- static cMCLogger* GetInstance();
+ static cMCLogger * GetInstance();
private:
enum eColorScheme
{