Merge commit '8db1be2ba8dc66d3abf69a8360990c659bf28f16' into daemon

reverse-scroll
nirenjan 2021-07-27 17:02:49 -07:00
commit 7a4d63adc1
1 changed files with 5 additions and 0 deletions

View File

@ -165,11 +165,16 @@ void pinelog_log_message(int level, const char *file, int line, const char *fmt,
} \ } \
} while(0) } while(0)
/* PINELOG_DISABLE_TRACE allows all traces to be compiled out */
#ifndef PINELOG_DISABLE_TRACE
#define PINELOG_TRACE(fmt, ...) do { \ #define PINELOG_TRACE(fmt, ...) do { \
if (PINELOG_LVL_TRACE <= pinelog_get_level()) { \ if (PINELOG_LVL_TRACE <= pinelog_get_level()) { \
pinelog_log_message(PINELOG_LVL_TRACE, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \ pinelog_log_message(PINELOG_LVL_TRACE, __FILE__, __LINE__, fmt, ##__VA_ARGS__); \
} \ } \
} while(0) } while(0)
#else
#define PINELOG_TRACE(fmt, ...) do { } while(0)
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }