logging: Fix checks of Kconfig option

The compiler was generating errors of the form
error: "CONFIG_LOG" is not defined, evaluates to 0 [-Werror=undef]
when -Wundef is used and the config option was turned off.  Change
check to ifdef/ifndef.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
This commit is contained in:
Bradley Bolen 2019-05-13 16:41:57 -04:00 committed by Andrew Boie
commit 63e784ca8c

View file

@ -20,7 +20,7 @@ extern "C" {
#error "Logger does not support 64 bit architecture."
#endif
#if !CONFIG_LOG
#ifndef CONFIG_LOG
#define CONFIG_LOG_DEFAULT_LEVEL 0
#define CONFIG_LOG_DOMAIN_ID 0
#define CONFIG_LOG_MAX_LEVEL 0
@ -330,7 +330,7 @@ extern "C" {
#define LOG_FILTER_FIRST_BACKEND_SLOT_IDX 1
#if CONFIG_LOG_RUNTIME_FILTERING
#ifdef CONFIG_LOG_RUNTIME_FILTERING
#define LOG_RUNTIME_FILTER(_filter) \
LOG_FILTER_SLOT_GET(&(_filter)->filters, LOG_FILTER_AGGR_SLOT_IDX)
#else