]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove deprecated logging functions
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 6 May 2019 22:31:24 +0000 (18:31 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 6 May 2019 22:31:24 +0000 (18:31 -0400)
src/lib/server/log.h
src/lib/util/log.c
src/lib/util/log.h
src/modules/proto_radius/proto_radius_auth.c
src/modules/rlm_mruby/rlm_mruby.c
src/modules/rlm_python/rlm_python.c
src/modules/rlm_test/rlm_test.c

index 61a1af21b003f3207f5f7175c13153da1dac287e..b1e5973fa10be86204e217c6dadbc8a4bc750c1d 100644 (file)
@@ -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__)
index b01773433f915742d374b83b21c4f11d27872d9d..0ea50feacf6ad6623defbc3de66ce4d09a48b689 100644 (file)
@@ -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;
index 1b25babcf5daaeaeefc7a8b830f9328ec1bcbb6a..efcd00db73445659fc24525e09b203ad4c9ff731 100644 (file)
@@ -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.
index 5cb829420c806c3cd7d90fef1ccfeec026fd8e1d..c8d71fc6f11303beb02e19fdfb2eba6932df2cd0 100644 (file)
@@ -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("<no User-Name attribute>"),
              logit ? "/" : "",
index b02219d25764d785ecf2833308c682a545596dd4..c4ed0956ae75e1253243d8c5b1094d1803644590 100644 (file)
@@ -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);
index 0ee7463648a7d8e95601c2f673095c2fd56bd0d6..6ae2cb7dd897e02d77c74e48b5d7bd068426c8b8 100644 (file)
@@ -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)
index ea259f18f9886ad38e932ff1e2446614241a05ae..3f8cb2e962c97d28546407a3dca6c462effe2b81 100644 (file)
@@ -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;
 }