Skip to content

Commit

Permalink
messages: capture errno in debug & trace messages as well
Browse files Browse the repository at this point in the history
So far if we were to use evt_tag_error() in debug or trace messages
we got a compilation error. Fix that.

Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Oct 5, 2024
1 parent 8d8eab0 commit 0b34010
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ void msg_add_option_group(GOptionContext *ctx);
#define msg_debug(desc, tags...) \
do { \
if (G_UNLIKELY(debug_flag)) \
msg_event_suppress_recursions_and_send( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \
CAPTURE_ERRNO(msg_event_suppress_recursions_and_send( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \
} while (0)

#define msg_trace(desc, tags...) \
do { \
if (G_UNLIKELY(trace_flag)) \
msg_event_suppress_recursions_and_send( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \
CAPTURE_ERRNO(msg_event_suppress_recursions_and_send( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \
} while (0)

#define msg_trace_printf(fmt, values...) \
Expand All @@ -122,8 +122,8 @@ void msg_add_option_group(GOptionContext *ctx);
#define msg_diagnostics(desc, tags...) \
do { \
if (G_UNLIKELY(trace_flag)) \
msg_event_print_event_to_stderr( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL )); \
CAPTURE_ERRNO(msg_event_print_event_to_stderr( \
msg_event_create(EVT_PRI_DEBUG, desc, ##tags, NULL ))); \
} while (0)

#define __once() \
Expand Down

0 comments on commit 0b34010

Please sign in to comment.