summaryrefslogtreecommitdiff
path: root/lib/nes/util/debug.hh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nes/util/debug.hh')
-rw-r--r--lib/nes/util/debug.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/nes/util/debug.hh b/lib/nes/util/debug.hh
new file mode 100644
index 0000000..409d55a
--- /dev/null
+++ b/lib/nes/util/debug.hh
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef NES_ENABLE_DEBUG_OUTPUT
+
+#include <spdlog/spdlog.h>
+
+#define NES_DEBUG_LOG(name, ...) \
+ spdlog::info("[" #name "] " __VA_ARGS__)
+
+#else
+
+#define NES_DEBUG_LOG(name, fmt, ...) \
+ (void)0
+
+#endif \ No newline at end of file