~kennylevinsen/seatd

d8ddf590faf49dec01453adc6ea238d94ba84478 — Kenny Levinsen a month ago e4c2822
log: Include debug logs in release builds
1 files changed, 0 insertions(+), 5 deletions(-)

M include/log.h
M include/log.h => include/log.h +0 -5
@@ 27,15 27,10 @@

#define log_error(str) _logf(LIBSEAT_LOG_LEVEL_ERROR, "[%s:%d] %s", __FILENAME__, __LINE__, str)

#ifdef DEBUG
#define log_debugf(fmt, ...) \
	_logf(LIBSEAT_LOG_LEVEL_DEBUG, "[%s:%d] " fmt, __FILENAME__, __LINE__, __VA_ARGS__)

#define log_debug(str) _logf(LIBSEAT_LOG_LEVEL_DEBUG, "[%s:%d] %s", __FILENAME__, __LINE__, str)
#else
#define log_debugf(fmt, ...)
#define log_debug(str)
#endif

void log_init(void);
void _logf(enum libseat_log_level level, const char *fmt, ...) ATTRIB_PRINTF(2, 3);