Skip to content

Commit

Permalink
Update '*dump' macros to require semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
abitmore committed Jan 20, 2022
1 parent 4d4a1f8 commit 3a815c7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/fc/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,27 +165,27 @@ namespace fc
// However, to log as much info as possible, it's better to catch exceptions when processing each argument
#define idump( SEQ ) \
{ \
try { \
do { try { \
ilog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) ); \
} catch( ... ) { \
ilog ( "[ERROR: Got exception while trying to dump ( ${args} )]",("args",FC_DUMP_FORMAT_ARG_NAMES(SEQ)) ); \
} \
} while( false ) \
}
#define wdump( SEQ ) \
{ \
try { \
do { try { \
wlog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) ); \
} catch( ... ) { \
wlog ( "[ERROR: Got exception while trying to dump ( ${args} )]",("args",FC_DUMP_FORMAT_ARG_NAMES(SEQ)) ); \
} \
} while( false ) \
}
#define edump( SEQ ) \
{ \
try { \
do { try { \
elog( FC_FORMAT(SEQ), FC_FORMAT_ARG_PARAMS(SEQ) ); \
} catch( ... ) { \
elog ( "[ERROR: Got exception while trying to dump ( ${args} )]",("args",FC_DUMP_FORMAT_ARG_NAMES(SEQ)) ); \
} \
} while( false ) \
}

// this disables all normal logging statements -- not something you'd normally want to do,
Expand Down

0 comments on commit 3a815c7

Please sign in to comment.