From 49503804ddcd71552fee5b8d5bd506c6beb632ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Wed, 23 Oct 2013 22:07:58 +0200 Subject: [PATCH] Allow user to always (not just in debug mode) compile in UC_DEBUGXXX log calls by defining UC_DEBUG_ALWAYS --- include/ucore/logging.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ucore/logging.h b/include/ucore/logging.h index b7bc443..bbaebe0 100644 --- a/include/ucore/logging.h +++ b/include/ucore/logging.h @@ -272,7 +272,9 @@ void uc_logf(int log_level, int module, int raw, const char *location, const char *fmt, ...) __attribute__((format(printf, 5, 6))); -#ifdef DEBUG +// only compile in UC_DEBUG log calls in debug mode, but allow the user +// to override that by defining UC_DEBUG_ALWAYS +#if defined(DEBUG) || defined(UC_DEBUG_ALWAYS) # define UC_DEBUGF(mod, fmt, ...)\ uc_logf(UC_LL_DEBUG, mod,0 , UC_SRC_LOCATION, fmt, ## __VA_ARGS__) # define UC_DEBUGFR(mod, fmt, ...)\