summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/log.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/log.h b/include/log.h
index 6ef891d4d2..add3a1e4a0 100644
--- a/include/log.h
+++ b/include/log.h
@@ -222,11 +222,14 @@ static inline int _log_nop(enum log_category_t cat, enum log_level_t level,
#define _SPL_BUILD 0
#endif
-#if !_DEBUG && CONFIG_IS_ENABLED(LOG)
+#if CONFIG_IS_ENABLED(LOG)
-#define debug_cond(cond, fmt, args...) \
-({ \
- log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
+#define debug_cond(cond, fmt, args...) \
+({ \
+ if (cond) \
+ log(LOG_CATEGORY, \
+ (enum log_level_t)(LOGL_FORCE_DEBUG | _LOG_DEBUG), \
+ fmt, ##args); \
})
#else /* _DEBUG */