add debug level

This commit is contained in:
virusdefender 2017-05-20 09:55:05 +08:00
parent 48da00080e
commit 817275e13d

View File

@ -13,7 +13,12 @@ void log_close(FILE *);
void log_write(int level, const char *source_filename, const int line_number, const FILE *log_fp, const char *, ...);
#ifdef JUDGER_DEBUG
#define LOG_DEBUG(log_fp, x...) log_write(LOG_LEVEL_DEBUG, __FILE__, __LINE__, log_fp, ##x)
#else
#define LOG_DEBUG(log_fp, x...)
#endif
#define LOG_INFO(log_fp, x...) log_write(LOG_LEVEL_INFO, __FILE__ __LINE__, log_fp, ##x)
#define LOG_WARNING(log_fp, x...) log_write(LOG_LEVEL_WARNING, __FILE__, __LINE__, log_fp, ##x)
#define LOG_FATAL(log_fp, x...) log_write(LOG_LEVEL_FATAL, __FILE__, __LINE__, log_fp, ##x)