Always print warning log messages 80/47180/4 accepted/tizen/mobile/20150903.053522 accepted/tizen/tv/20150903.053645 accepted/tizen/wearable/20150903.053733 submit/tizen/20150903.001243
authorRafal Krypa <r.krypa@samsung.com>
Mon, 31 Aug 2015 16:07:06 +0000 (18:07 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Wed, 2 Sep 2015 15:16:20 +0000 (08:16 -0700)
Several types of log messages are printed only when the code is build in DEBUG
mode. This includes warning messages, but they should be printed always.
Warning logs are generated in erroneous situation and they should not be lost
int RELEASE builds.

Change-Id: I9e9934c13b066492294cb5bd76d94030b6ee43c7
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/dpl/log/include/dpl/log/log.h

index 206223c..9e5fd8f 100644 (file)
@@ -152,18 +152,17 @@ do                                                                         \
     }                                                                      \
 } while (0)
 
-/* Errors must be always logged. */
+/* Errors and warnings must be always logged. */
 #define  LogError(message) DPL_MACRO_FOR_LOGGING(message, Error)
+#define  LogWarning(message) DPL_MACRO_FOR_LOGGING(message, Warning)
 
 #ifdef BUILD_TYPE_DEBUG
     #define LogDebug(message) DPL_MACRO_FOR_LOGGING(message, Debug)
     #define LogInfo(message) DPL_MACRO_FOR_LOGGING(message, Info)
-    #define LogWarning(message) DPL_MACRO_FOR_LOGGING(message, Warning)
     #define LogPedantic(message) DPL_MACRO_FOR_LOGGING(message, Pedantic)
 #else
     #define LogDebug(message) DPL_MACRO_DUMMY_LOGGING(message, Debug)
     #define LogInfo(message) DPL_MACRO_DUMMY_LOGGING(message, Info)
-    #define LogWarning(message) DPL_MACRO_DUMMY_LOGGING(message, Warning)
     #define LogPedantic(message) DPL_MACRO_DUMMY_LOGGING(message, Pedantic)
 #endif // BUILD_TYPE_DEBUG