From: Arran Cudbard-Bell Date: Mon, 6 May 2019 22:31:24 +0000 (-0400) Subject: Remove deprecated logging functions X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72a1fccdebdd2e5fea21c25206574db7cab8683;p=thirdparty%2Ffreeradius-server.git Remove deprecated logging functions --- diff --git a/src/lib/server/log.h b/src/lib/server/log.h index 61a1af21b00..b1e5973fa10 100644 --- a/src/lib/server/log.h +++ b/src/lib/server/log.h @@ -145,19 +145,12 @@ void log_global_free(void); * **Debug categories** * Name | Syslog severity | Colour/style | When to use * -------- | ----------------------- | ------------ | ----------- - * AUTH | LOG_NOTICE | Bold | Never - Deprecated - * ACCT | LOG_NOTICE | Bold | Never - Deprecated - * PROXY | LOG_NOTICE | Bold | Never - Deprecated * INFO | LOG_INFO | Bold | TBD * WARN | LOG_WARNING | Yellow | Warnings. Impending resource exhaustion, resource exhaustion * ERROR | LOG_ERR | Red | Critical server errors. Malformed queries, failed operations, connection errors, packet processing errors * * @{ */ -#define AUTH(fmt, ...) _FR_LOG(L_AUTH, fmt, ## __VA_ARGS__) -#define ACCT(fmt, ...) _FR_LOG(L_ACCT, fmt, ## __VA_ARGS__) -#define PROXY(fmt, ...) _FR_LOG(L_PROXY, fmt, ## __VA_ARGS__) - #define INFO(fmt, ...) _FR_LOG(L_INFO, fmt, ## __VA_ARGS__) #define WARN(fmt, ...) _FR_LOG(L_WARN, fmt, ## __VA_ARGS__) #define ERROR(fmt, ...) _FR_LOG(L_ERR, fmt, ## __VA_ARGS__) @@ -214,17 +207,11 @@ void log_global_free(void); * **Debug categories** * Name | Syslog severity | Colour/style | When to use * -------- | ----------------------- | -------------| ----------- - * RAUTH | LOG_NOTICE | Bold | Never - Deprecated - * RACCT | LOG_NOTICE | Bold | Never - Deprecated - * RPROXY | LOG_NOTICE | Bold | Never - Deprecated * RINFO | LOG_INFO | Bold | TBD * RWARN | LOG_WARNING | Yellow/Bold | Warnings. Impending resource exhaustion, or resource exhaustion. * RERROR | LOG_ERR | Red/Bold | Critical server errors. Malformed queries, failed operations, connection errors, packet processing errors. * @{ */ -#define RAUTH(fmt, ...) log_request(L_AUTH, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) -#define RACCT(fmt, ...) log_request(L_ACCT, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) -#define RPROXY(fmt, ...) log_request(L_PROXY, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) #define RINFO(fmt, ...) log_request(L_INFO, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) #define RWARN(fmt, ...) log_request(L_DBG_WARN, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) #define RERROR(fmt, ...) log_request_error(L_DBG_ERR, L_DBG_LVL_OFF, request, fmt, ## __VA_ARGS__) diff --git a/src/lib/util/log.c b/src/lib/util/log.c index b01773433f9..0ea50feacf6 100644 --- a/src/lib/util/log.c +++ b/src/lib/util/log.c @@ -116,11 +116,8 @@ void fr_canonicalize_error(TALLOC_CTX *ctx, char **sp, char **text, ssize_t slen */ const FR_NAME_NUMBER fr_log_levels[] = { { "Debug : ", L_DBG }, - { "Auth : ", L_AUTH }, - { "Proxy : ", L_PROXY }, { "Info : ", L_INFO }, { "Warn : ", L_WARN }, - { "Acct : ", L_ACCT }, { "Error : ", L_ERR }, { "WARN : ", L_DBG_WARN }, { "ERROR : ", L_DBG_ERR }, @@ -149,10 +146,7 @@ const FR_NAME_NUMBER fr_log_levels[] = { */ static const FR_NAME_NUMBER colours[] = { { "", L_DBG }, - { VTC_BOLD, L_AUTH }, - { VTC_BOLD, L_PROXY }, { VTC_BOLD, L_INFO }, - { VTC_BOLD, L_ACCT }, { VTC_RED, L_ERR }, { VTC_BOLD VTC_YELLOW, L_WARN }, { VTC_BOLD VTC_RED, L_DBG_ERR }, @@ -347,12 +341,6 @@ int fr_vlog(fr_log_t const *log, fr_log_type_t type, char const *msg, va_list ap type = LOG_DEBUG; break; - case L_AUTH: - case L_PROXY: - case L_ACCT: - type = LOG_NOTICE; - break; - case L_INFO: type = LOG_INFO; break; diff --git a/src/lib/util/log.h b/src/lib/util/log.h index 1b25babcf5d..efcd00db734 100644 --- a/src/lib/util/log.h +++ b/src/lib/util/log.h @@ -50,13 +50,9 @@ extern bool log_dates_utc; extern const FR_NAME_NUMBER fr_log_levels[]; typedef enum { - L_AUTH = 2, //!< Authentication message. L_INFO = 3, //!< Informational message. L_ERR = 4, //!< Error message. L_WARN = 5, //!< Warning. - L_PROXY = 6, //!< Proxy messages - L_ACCT = 7, //!< Accounting messages - L_DBG = 16, //!< Only displayed when debugging is enabled. L_DBG_INFO = 17, //!< Info only displayed when debugging is enabled. L_DBG_WARN = 18, //!< Warning only displayed when debugging is enabled. diff --git a/src/modules/proto_radius/proto_radius_auth.c b/src/modules/proto_radius/proto_radius_auth.c index 5cb829420c8..c8d71fc6f11 100644 --- a/src/modules/proto_radius/proto_radius_auth.c +++ b/src/modules/proto_radius/proto_radius_auth.c @@ -229,7 +229,7 @@ static void CC_HINT(format (printf, 4, 5)) auth_message(proto_radius_auth_t cons msg = fr_vasprintf(request, fmt, ap); va_end(ap); - RAUTH("%s: [%pV%s%pV] (%s)%s", + RINFO("%s: [%pV%s%pV] (%s)%s", msg, username ? &username->data : fr_box_strvalue(""), logit ? "/" : "", diff --git a/src/modules/rlm_mruby/rlm_mruby.c b/src/modules/rlm_mruby/rlm_mruby.c index b02219d2576..c4ed0956ae7 100644 --- a/src/modules/rlm_mruby/rlm_mruby.c +++ b/src/modules/rlm_mruby/rlm_mruby.c @@ -158,12 +158,9 @@ static int mod_instantiate(void *instance, CONF_SECTION *conf) /* Define the logging constants */ A(L_DBG); A(L_WARN); - A(L_AUTH); A(L_INFO); A(L_ERR); - A(L_PROXY); A(L_WARN); - A(L_ACCT); A(L_DBG_WARN); A(L_DBG_ERR); A(L_DBG_WARN_REQ); diff --git a/src/modules/rlm_python/rlm_python.c b/src/modules/rlm_python/rlm_python.c index 0ee7463648a..6ae2cb7dd89 100644 --- a/src/modules/rlm_python/rlm_python.c +++ b/src/modules/rlm_python/rlm_python.c @@ -143,12 +143,9 @@ static struct { A(L_DBG) A(L_WARN) - A(L_AUTH) A(L_INFO) A(L_ERR) - A(L_PROXY) A(L_WARN) - A(L_ACCT) A(L_DBG_WARN) A(L_DBG_ERR) A(L_DBG_WARN_REQ) diff --git a/src/modules/rlm_test/rlm_test.c b/src/modules/rlm_test/rlm_test.c index ea259f18f98..3f8cb2e962c 100644 --- a/src/modules/rlm_test/rlm_test.c +++ b/src/modules/rlm_test/rlm_test.c @@ -245,9 +245,6 @@ static int mod_instantiate(void *instance, UNUSED CONF_SECTION *conf) DEBUG2("Debug2 message"); DEBUG3("Debug3 message"); DEBUG4("Debug4 message"); - AUTH("Auth message"); - ACCT("Acct message"); - PROXY("Proxy message"); return 0; }