123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /*
- * category: [core]
- * apply status:
- * edit status:
- * build status:
- * description:
- */
- #ifndef __XLOG_H__
- #define __XLOG_H__
- #pragma once
- #include "config.h"
- #include <stdarg.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define XLOG_LEVEL_ALL 0
- #define XLOG_LEVEL_TRACE 1
- #define XLOG_LEVEL_DEBUG 2
- #define XLOG_LEVEL_INFO 3
- #define XLOG_LEVEL_WARN 4
- #define XLOG_LEVEL_ERROR 5
- #define XLOG_LEVEL_FATAL 6
- #define XLOG_LEVEL_NONE 7
- TOOLKIT_API int xlog_add_logger(const char *name, const char *type, ...);
- TOOLKIT_API int xlog_remove_logger(const char *name);
- TOOLKIT_API int xlog_init(const char *inifile);
- TOOLKIT_API int xlog_term();
- TOOLKIT_API int xlog_log(const char *inst, int level, const char *str);//跟xlog_init绑定的
- TOOLKIT_API int xlog_log_v(const char *inst, int level, const char *fmt, va_list arg);
- TOOLKIT_API int xlog_set_level(const char* inst, int level);
- TOOLKIT_API int xlog_get_level(const char* inst, int *level);
- #ifdef __cplusplus
- } // extern "C" {
- #endif
- #endif //__XLOG_H__
|