do { \
char janus_log_ts[64] = ""; \
char janus_log_src[128] = ""; \
struct tm janustmresult; \
time_t janusltime = time(NULL); \
localtime_r(&janusltime, &janustmresult); \
strftime(janus_log_ts, sizeof(janus_log_ts), \
"[%a %b %e %T %Y] ", &janustmresult); \
} \
snprintf(janus_log_src, sizeof(janus_log_src), \
"[%s:%s:%d] ", __FILE__, __FUNCTION__, __LINE__); \
janus_log_ts, \
janus_log_src, \
##__VA_ARGS__); \
} \
} while (0)
gboolean janus_log_colors
Definition: janus-cfgconv.c:36
#define JANUS_PRINT
Simple wrapper to g_print/printf.
Definition: debug.h:84
int janus_log_level
Definition: janus-cfgconv.c:34
#define LOG_ERR
Non-fatal error.
Definition: debug.h:43
#define LOG_NONE
No debugging.
Definition: debug.h:39
gboolean janus_log_timestamps
Definition: janus-cfgconv.c:35
#define LOG_MAX
Maximum level of debugging.
Definition: debug.h:55
char * janus_log_global_prefix
Definition: janus-cfgconv.c:37
#define LOG_FATAL
Fatal error.
Definition: debug.h:41
#define LOG_DBG
Debug message (includes .c filename, function and line number)
Definition: debug.h:53
Logger based on different levels, which can either be displayed or not according to the configuration of the server. The format must be a string literal.