diff options
author | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
---|---|---|
committer | electromatter <electromatter@gmail.com> | 2015-09-22 04:44:34 +0200 |
commit | a24cc0184343416eed86b208d8a2aff2b5c0892c (patch) | |
tree | 04ced91aa4a70b4c6e033fac4a2fc2e2ea206205 /src/Globals.h | |
parent | added bungeecord support for protocol18x (diff) | |
parent | Merge pull request #2488 from cuberite/ChatFlag (diff) | |
download | cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.gz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.bz2 cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.lz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.xz cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.tar.zst cuberite-a24cc0184343416eed86b208d8a2aff2b5c0892c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Globals.h | 20 |
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); |