From a77e00ea27530ddfecf09fd0ae32f186ce8b1911 Mon Sep 17 00:00:00 2001 From: Rafal Krypa Date: Mon, 31 Aug 2015 18:07:06 +0200 Subject: [PATCH] Always print warning log messages 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 --- src/dpl/log/include/dpl/log/log.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/dpl/log/include/dpl/log/log.h b/src/dpl/log/include/dpl/log/log.h index 206223c..9e5fd8f 100644 --- a/src/dpl/log/include/dpl/log/log.h +++ b/src/dpl/log/include/dpl/log/log.h @@ -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 -- 2.7.4