aboutsummaryrefslogtreecommitdiff
path: root/src/main/input-output/log_helper.h
diff options
context:
space:
mode:
authorthecharlesblake2017-11-12 09:51:32 +0000
committerthecharlesblake2017-11-12 09:51:38 +0000
commit2b6b5d1046c69a43656cc8990426176ad20ed597 (patch)
tree718ff48189401a552c72e370001027fc08fdc1b3 /src/main/input-output/log_helper.h
parentImprove game state gen + run() returns opt<sol> (diff)
downloadmetasol-2b6b5d1046c69a43656cc8990426176ad20ed597.tar.gz
metasol-2b6b5d1046c69a43656cc8990426176ad20ed597.zip

Make log macros proper functions

Diffstat (limited to 'src/main/input-output/log_helper.h')
-rw-r--r--src/main/input-output/log_helper.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/input-output/log_helper.h b/src/main/input-output/log_helper.h
index 441381f..71cc5f4 100644
--- a/src/main/input-output/log_helper.h
+++ b/src/main/input-output/log_helper.h
@@ -8,12 +8,12 @@
#include <iostream>
#if defined NDEBUG
- #define LOG_DEBUG
+ #define LOG_DEBUG(msg)
#else
- #define LOG_DEBUG clog << "[debug]\n"
+ #define LOG_DEBUG(msg) clog << "[debug]\n" << msg << "\n"
#endif
-#define LOG_INFO clog << "[info] "
-#define LOG_WARNING clog << "[warning] "
-#define LOG_ERROR cerr << "[ERROR] "
+#define LOG_INFO(msg) clog << "[info] " << msg << "\n"
+#define LOG_WARNING clog(msg) << "[warning] " << msg << "\n"
+#define LOG_ERROR(msg) cerr << "[ERROR] " << msg << "\n"
#endif //SOLVITAIRE_LOG_HELPER_H