From aa1bfa9eec00fe89e0038bf334c159f40aff0792 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 28 Apr 2024 04:35:52 +0200 Subject: [PATCH] Kill COMPILE_TIME_LOGLEVEL. Nobody has ever used this, and the build gets never tested with non-default compile time loglevel, so... --- log.h | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/log.h b/log.h index 7dd5043..47a3b7a 100644 --- a/log.h +++ b/log.h @@ -15,9 +15,6 @@ /** last message before exit */ #define EMERG 7 -/** Log messages with lower priority than that will not be compiled in. */ -#define COMPILE_TIME_LOGLEVEL 0 - /** Not all compilers support __func__ or an equivalent. */ #if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(__GNUC__) # if defined(_MSC_VER) && _MSC_VER >= 1300 @@ -28,73 +25,44 @@ # endif #endif -/** \cond */ -#if DEBUG > COMPILE_TIME_LOGLEVEL #define DSS_DEBUG_LOG(args) \ do { \ dss_log_set_params(DEBUG, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_DEBUG_LOG(args) do {;} while (0) -#endif -#if INFO > COMPILE_TIME_LOGLEVEL #define DSS_INFO_LOG(args) \ do { \ dss_log_set_params(INFO, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_INFO_LOG(args) do {;} while (0) -#endif -#if NOTICE > COMPILE_TIME_LOGLEVEL #define DSS_NOTICE_LOG(args) \ do { \ dss_log_set_params(NOTICE, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_NOTICE_LOG(args) do {;} while (0) -#endif -#if WARNING > COMPILE_TIME_LOGLEVEL #define DSS_WARNING_LOG(args) \ do { \ dss_log_set_params(WARNING, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_WARNING_LOG(args) do {;} while (0) -#endif -#if ERROR > COMPILE_TIME_LOGLEVEL #define DSS_ERROR_LOG(args) \ do { \ dss_log_set_params(ERROR, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_ERROR_LOG(args) do {;} while (0) -#endif -#if CRIT > COMPILE_TIME_LOGLEVEL #define DSS_CRIT_LOG(args) \ do { \ dss_log_set_params(CRIT, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_CRIT_LOG(args) do {;} while (0) -#endif -#if EMERG > COMPILE_TIME_LOGLEVEL #define DSS_EMERG_LOG(args) \ do { \ dss_log_set_params(EMERG, __FILE__, __LINE__, __func__); \ dss_log args ; \ } while (0) -#else -#define DSS_EMERG_LOG(args) -#endif -- 2.39.5