Skip to content

Commit

Permalink
Disable debug log messages in Release build
Browse files Browse the repository at this point in the history
  • Loading branch information
dvsku committed Jul 11, 2024
1 parent 986ff84 commit 11b6a47
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions include/libnetwrk/net/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,15 @@
#define LIBNETWRK_VERBOSE(component, frmt, ...) do {} while(0)
#endif

#ifndef LIBNETWRK_DEBUG
#define LIBNETWRK_DEBUG(component, frmt, ...) do {} while(0)
#ifdef NDEBUG
#ifdef LIBNETWRK_DEBUG
#undef LIBNETWRK_DEBUG
#endif
#define LIBNETWRK_DEBUG(component, frmt, ...) do {} while(0)
#else
#ifndef LIBNETWRK_DEBUG
#define LIBNETWRK_DEBUG(component, frmt, ...) do {} while(0)
#endif
#endif

#ifndef LIBNETWRK_ENABLE_FILE_LOG
Expand Down

0 comments on commit 11b6a47

Please sign in to comment.