summaryrefslogtreecommitdiff
path: root/updater/Logger.h
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-12-04 02:03:27 +0200
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2011-12-04 02:03:27 +0200
commit9525854f31970a4eef3bf10fb8bf268128245fb7 (patch)
treead05b77bf85a83ab2ad534413175a9cf12d12359 /updater/Logger.h
parentd1a97e27e880a8b052cba50536d5c41123b4c8df (diff)
parent3f5580d66ef6c237c8de7f9b8a71fa41d4cf3169 (diff)
Merge branch 'master' of ssh://sss.chaoslab.ru//home/private_git/proxy_ui
Diffstat (limited to 'updater/Logger.h')
-rw-r--r--[l---------]updater/Logger.h56
1 files changed, 55 insertions, 1 deletions
diff --git a/updater/Logger.h b/updater/Logger.h
index 03aacbf..cecd454 120000..100644
--- a/updater/Logger.h
+++ b/updater/Logger.h
@@ -1 +1,55 @@
-../client/Logger.h \ No newline at end of file
+
+
+#ifndef LOG_H
+#define LOG_H
+
+enum LogLevelType
+{
+ TraceLevel = 0,
+ DebugLevel,
+ InfoLevel,
+ WarnLevel,
+ ErrorLevel,
+ FatalLevel
+};
+
+
+#ifdef DEBUG
+
+#include <stdarg.h>
+
+class Logger
+{
+public:
+ static LogLevelType LogLevel;
+
+ static void Trace(std::string msg, ...);
+ static void Debug(std::string msg, ...);
+ static void Info(std::string msg, ...);
+ static void Warn(std::string msg, ...);
+ static void Error(std::string msg, ...);
+ static void Fatal(std::string msg, ...);
+ static void Log(LogLevelType logLevel, std::string msg, ...);
+private:
+ static void Log(LogLevelType logLevel, std::string msg, va_list arsg);
+};
+
+#else
+
+class Logger
+{
+public:
+ static LogLevelType LogLevel;
+
+ static void Trace(std::string msg, ...) {}
+ static void Debug(std::string msg, ...) {}
+ static void Info(std::string msg, ...) {}
+ static void Warn(std::string msg, ...) {}
+ static void Error(std::string msg, ...) {}
+ static void Fatal(std::string msg, ...) {}
+ static void Log(LogLevelType logLevel, std::string msg, ...) {}
+};
+
+#endif
+
+#endif \ No newline at end of file