|
|
|
|
27
|
|
27
|
|
28
|
#define LIGHT_LOG(lvl, fp, fmt, args...) \
|
28
|
#define LIGHT_LOG(lvl, fp, fmt, args...) \
|
29
|
if (light_loglevel >= lvl) \
|
29
|
if (light_loglevel >= lvl) \
|
30
|
- fprintf(fp, "%s:%d:" fmt, __FILE__, __LINE__, ##args)
|
|
|
|
|
30
|
+ fprintf(fp, "%s:%d:" fmt "\n", __FILE__, __LINE__, ##args)
|
31
|
|
31
|
|
32
|
#define LIGHT_NOTE(fmt, args...) LIGHT_LOG(LIGHT_NOTE_LEVEL, stdout, "NOTE:" fmt, ##args)
|
32
|
#define LIGHT_NOTE(fmt, args...) LIGHT_LOG(LIGHT_NOTE_LEVEL, stdout, "NOTE:" fmt, ##args)
|
33
|
#define LIGHT_WARN(fmt, args...) LIGHT_LOG(LIGHT_WARN_LEVEL, stderr, "WARN:" fmt, ##args)
|
33
|
#define LIGHT_WARN(fmt, args...) LIGHT_LOG(LIGHT_WARN_LEVEL, stderr, "WARN:" fmt, ##args)
|