36 #define FMT_LONG "%"PRIdMAX 37 #define FMT_WEAKSUM "%08"PRIx32 40 # define FMT_SIZE "%zu" 42 # define FMT_SIZE "%Iu" 45 #if defined(__clang__) || defined(__GNUC__) 49 void rs_log0(
int level,
char const *fn,
char const *fmt, ...)
50 __attribute__ ((format(printf, 3, 4)));
53 # define rs_trace(fmt, arg...) \ 54 do { rs_log0(RS_LOG_DEBUG, __FUNCTION__, fmt , ##arg); \ 57 # define rs_trace(fmt, arg...) 60 # define rs_log(l, s, str...) do { \ 61 rs_log0((l), __FUNCTION__, (s) , ##str); \ 64 # define rs_error(s, str...) do { \ 65 rs_log0(RS_LOG_ERR, __FUNCTION__, (s) , ##str); \ 68 # define rs_fatal(s, str...) do { \ 69 rs_log0(RS_LOG_CRIT, __FUNCTION__, \ 75 # define rs_trace rs_trace0 76 # define rs_fatal rs_fatal0 77 # define rs_error rs_error0 78 # define rs_log rs_log0_nofn 81 void rs_trace0(
char const *s, ...);
82 void rs_fatal0(
char const *s, ...);
83 void rs_error0(
char const *s, ...);
84 void rs_log0(
int level,
char const *fn,
char const *fmt, ...);
85 void rs_log0_nofn(
int level,
char const *fmt, ...);
100 # define rs_trace_enabled() ((rs_trace_level & RS_LOG_PRIMASK) >= RS_LOG_DEBUG) 102 # define rs_trace_enabled() 0 int rs_trace_level
\macro rs_trace_enabled()
Don't show function name in message.
Mask to extract priority part.