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, ...)\