Add project files.
This commit is contained in:
39
libthecore/include/log.h
Normal file
39
libthecore/include/log.h
Normal file
@ -0,0 +1,39 @@
|
||||
#ifndef __INC_LIBTHECORE_LOG_H__
|
||||
#define __INC_LIBTHECORE_LOG_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif /* __cplusplus */
|
||||
extern int log_init(void);
|
||||
extern void log_destroy(void);
|
||||
extern void log_rotate(void);
|
||||
|
||||
// <20>α<EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bitvector<6F><72> ó<><C3B3><EFBFBD>ȴ<EFBFBD>)
|
||||
extern void log_set_level(unsigned int level);
|
||||
extern void log_unset_level(unsigned int level);
|
||||
|
||||
// <20>α<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ŭ <20><><EFBFBD><EFBFBD><EFBFBD>ϴ°<CFB4><C2B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD>
|
||||
extern void log_set_expiration_days(unsigned int days);
|
||||
extern int log_get_expiration_days(void);
|
||||
|
||||
#ifndef __WIN32__
|
||||
extern void _sys_err(const char *func, int line, const char *format, ...);
|
||||
#else
|
||||
extern void _sys_err(const char *func, int line, const char *format, ...);
|
||||
#endif
|
||||
extern void sys_log_header(const char *header);
|
||||
extern void sys_log(unsigned int lv, const char *format, ...);
|
||||
extern void pt_log(const char *format, ...);
|
||||
|
||||
#ifndef __WIN32__
|
||||
#define sys_err(fmt, args...) _sys_err(__FUNCTION__, __LINE__, fmt, ##args)
|
||||
#else
|
||||
#define sys_err(fmt, ...) _sys_err(__FUNCTION__, __LINE__, fmt, __VA_ARGS__)
|
||||
#endif // __WIN32__
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __INC_LOG_H__
|
Reference in New Issue
Block a user