Skip to content

Commit

Permalink
Add a macro for creating debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Evilur committed Sep 26, 2024
1 parent a751177 commit f8bde40
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/master.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@

#include <dpp/dpp.h>

/* Add a var to check whether the build is a Debug or a Relase */
#define DEBUG_BUILD !NDEBUG
/* Create a macro that outputs detailed logs to the terminal, only if the assembly is built with the DEBUG flag.
* In the RELEASE build, these logs will not be displayed in the terminal */
#ifndef NDEBUG
#define DEBUG_LOG(str) Logger::Debug(str);
#else
#define DEBUG_LOG(str)
#endif

inline dpp::discord_client* ds_client = nullptr;
inline dpp::cluster* bot = nullptr;
Expand Down

0 comments on commit f8bde40

Please sign in to comment.