diff --git a/src/log.h b/src/log.h index b1fae24..64dccd7 100644 --- a/src/log.h +++ b/src/log.h @@ -44,6 +44,13 @@ void log_set_quiet(bool enable); int log_add_callback(log_LogFn fn, void *udata, int level); int log_add_fp(FILE *fp, int level); -void log_log(int level, const char *file, int line, const char *fmt, ...); +#define RXI_LOGC_FMT_ATTRIB(n, m) + +#if defined __GNUC__ +# define RXI_LOGC_FMT_ATTRIB(n, m) __attribute__((format(printf, n, m))) +#endif + + +void log_log(int level, const char *file, int line, const char *fmt, ...) RXI_LOGC_FMT_ATTRIB(4, 5); #endif