From 8ecb1aa8c57200344f5d969b80984fe53ca91f15 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Thu, 15 Oct 2015 14:33:32 +0200 Subject: [PATCH] Fixed LOG_LEVEL not being defined correctly and therefore unchangable --- include/Core/Util/Logging.h | 6 +----- src/game/Core/Util/Logging.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/game/Core/Util/Logging.cpp diff --git a/include/Core/Util/Logging.h b/include/Core/Util/Logging.h index 073e96c..3b840f0 100644 --- a/include/Core/Util/Logging.h +++ b/include/Core/Util/Logging.h @@ -45,11 +45,7 @@ enum _LOG_LEVEL LOG_LEVEL_DEBUG }; -#ifdef DEBUG -static _LOG_LEVEL LOG_LEVEL = LOG_LEVEL_DEBUG; -#else -static _LOG_LEVEL LOG_LEVEL = LOG_LEVEL_DEBUG; -#endif +extern _LOG_LEVEL LOG_LEVEL; const static char* _LOG_LEVEL_PREFIX[] = { diff --git a/src/game/Core/Util/Logging.cpp b/src/game/Core/Util/Logging.cpp new file mode 100644 index 0000000..a348383 --- /dev/null +++ b/src/game/Core/Util/Logging.cpp @@ -0,0 +1,7 @@ +#include "Core/Util/Logging.h" + +#ifdef DEBUG +_LOG_LEVEL LOG_LEVEL = LOG_LEVEL_DEBUG; +#else +_LOG_LEVEL LOG_LEVEL = LOG_LEVEL_ERROR; +#endif \ No newline at end of file