* **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__)
* **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__)
*/
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 },
*/
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 },
type = LOG_DEBUG;
break;
- case L_AUTH:
- case L_PROXY:
- case L_ACCT:
- type = LOG_NOTICE;
- break;
-
case L_INFO:
type = LOG_INFO;
break;
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.