diff options
author | chai <chaifix@163.com> | 2018-11-18 23:44:40 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-11-18 23:44:40 +0800 |
commit | 8cb74178c2b8e5883a1181af687fa8cfc0c6e5da (patch) | |
tree | f56c536a029148df35bd4e82034a9b563a2381df /src/libjin/Utils/je_log.h | |
parent | f0f340dec7821cee103ab9267ef941a917ef4dc4 (diff) |
*修改目录为小写
Diffstat (limited to 'src/libjin/Utils/je_log.h')
-rw-r--r-- | src/libjin/Utils/je_log.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/libjin/Utils/je_log.h b/src/libjin/Utils/je_log.h deleted file mode 100644 index f81bbae..0000000 --- a/src/libjin/Utils/je_log.h +++ /dev/null @@ -1,63 +0,0 @@ -#ifndef __LOG_H__ELPER_H__ -#define __LOG_H__ELPER_H__ - -#include <string> -#include <iostream> -#include <fstream> -#include <stdarg.h> - -#include "../core/je_configuration.h" - -class Loghelper -{ -public: - // logĿ - enum Direction - { - DIR_CERR = 1 << 1, // - DIR_FILE = 1 << 2, // logļ - }; - - // ȼ - enum Level - { - LV_NONE = 0, // none - LV_ERROR = 1 << 1, // error - LV_WARNING = 1 << 2, // warn - LV_INFO = 1 << 3, // info - LV_DEBUG = 1 << 4, // debug - LV_ALL = 0xffffffff - }; - - static void log(Level _level, const char* _fmt, ...); - - // ض - static void redirect(unsigned int _dir, char* _path = nullptr); - - // ɸѡȼ - static void restrict(unsigned int levels); - - static void close(); - -private: - static unsigned int dir; // Ŀ - static unsigned int levels; // ȼ - static std::ofstream fs; // ļ -}; - - -typedef Loghelper::Level Loglevel; - -#if defined(jin_debug) - #define jin_log_error(f, ...) Loghelper::log(Loghelper::LV_ERROR, f, __VA_ARGS__) - #define jin_log_info(f, ...) Loghelper::log(Loghelper::LV_INFO, f, __VA_ARGS__) - #define jin_log_warning(f, ...) Loghelper::log(Loghelper::LV_WARNING, f, __VA_ARGS__) - #define jin_log_debug(f, ...) Loghelper::log(Loghelper::LV_DEBUG, f, __VA_ARGS__) -#else - #define jin_log_error(f, ...) - #define jin_log_info(f, ...) - #define jin_log_warning(f, ...) - #define jin_log_debug(f, ...) -#endif - -#endif // __LOG_H__ELPER_H__
\ No newline at end of file |