From a0c29514d2ab69bf1ebf22af498ddf336fc89701 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 18 Feb 2012 17:49:02 +0000 Subject: Logging: added LOGD macro that logs only in debug builds git-svn-id: http://mc-server.googlecode.com/svn/trunk@290 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cMCLogger.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/source/cMCLogger.h b/source/cMCLogger.h index 0d1770e2d..3157ce6a8 100644 --- a/source/cMCLogger.h +++ b/source/cMCLogger.h @@ -1,11 +1,15 @@ #pragma once -#ifndef _WIN32 - #include -#endif + + class cLog; + + + + + class cMCLogger //tolua_export { //tolua_export private: @@ -38,6 +42,21 @@ extern void LOGINFO(const char* a_Format, ...); extern void LOGWARN(const char* a_Format, ...); extern void LOGERROR(const char* a_Format, ...); + + + + +// In debug builds, translate LOGD to LOG, otherwise leave it out altogether: +#ifdef _DEBUG + #define LOGD LOG +#else + #define LOGD(...) +#endif // _DEBUG + + + + + #define LOGWARNING LOGWARN -- cgit v1.2.3