summaryrefslogtreecommitdiffstats
path: root/src/Globals.h
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-08-30 23:57:43 +0200
committertycho <work.tycho@gmail.com>2015-09-15 17:19:49 +0200
commit3187dbf0aa0943d9eca0c5c1259f8a8ca549709b (patch)
tree82d3aaa2905d360779ea472bc3baf91f8539758b /src/Globals.h
parentMerge pull request #2473 from cuberite/APIDumpRename (diff)
downloadcuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar.gz
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar.bz2
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar.lz
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar.xz
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.tar.zst
cuberite-3187dbf0aa0943d9eca0c5c1259f8a8ca549709b.zip
Diffstat (limited to '')
-rw-r--r--src/Globals.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Globals.h b/src/Globals.h
index 1afcc928c..a69a64452 100644
--- a/src/Globals.h
+++ b/src/Globals.h
@@ -271,7 +271,25 @@ template class SizeChecker<UInt8, 1>;
#include "OSSupport/StackTrace.h"
#ifndef TEST_GLOBALS
- #include "Logger.h"
+
+// These fiunctions are defined in Logger.cpp, but are declared here to avoid including all of logger.h
+extern void LOG (const char * a_Format, ...) FORMATSTRING(1, 2);
+extern void LOGINFO (const char * a_Format, ...) FORMATSTRING(1, 2);
+extern void LOGWARNING(const char * a_Format, ...) FORMATSTRING(1, 2);
+extern void LOGERROR (const char * a_Format, ...) FORMATSTRING(1, 2);
+
+
+
+
+
+// In debug builds, translate LOGD to LOG, otherwise leave it out altogether:
+#ifdef _DEBUG
+ #define LOGD LOG
+#else
+ #define LOGD(...)
+#endif // _DEBUG
+
+#define LOGWARN LOGWARNING
#else
// Logging functions
void inline LOGERROR(const char * a_Format, ...) FORMATSTRING(1, 2);