Commit 6451a360 authored by venaas's avatar venaas Committed by venaas

4 debug levels, 3 default

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@78 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent 2311c004
......@@ -12,11 +12,11 @@ proxy's current work directory. You may alter the path near
the top of radsecproxy.h if necessary.
There are two options that may be specified on the command line.
They are "-d loglevel" to set a loglevel of 1, 2 or 3 where 3
They are "-d loglevel" to set a loglevel of 1, 2, 3 or 4 where 4
is the most detailed logging. Also "-f" to run the proxy in
the foreground with logging to stderr. Without "-f" the default
is to detach as a daemon and log to syslog.
For more information, feedback etc. contact <venaas@uninett.no>.
Stig Venaas, 2007.05.07
Stig Venaas, 2007.05.09
......@@ -19,7 +19,7 @@
#include "debug.h"
static char *debug_ident = NULL;
static uint8_t debug_level = DBG_WARN;
static uint8_t debug_level = DBG_INFO;
static FILE *debug_file = NULL;
static int debug_syslogfacility = 0;
......@@ -40,6 +40,9 @@ void debug_set_level(uint8_t level) {
case 3:
debug_level = DBG_INFO;
return;
case 4:
debug_level = DBG_DBG;
return;
}
}
......@@ -90,6 +93,9 @@ void debug_logit(uint8_t level, const char *format, va_list ap) {
if (debug_syslogfacility) {
switch (level) {
case DBG_DBG:
priority = LOG_DEBUG;
break;
case DBG_INFO:
priority = LOG_INFO;
break;
......
......@@ -6,6 +6,7 @@
* copyright notice and this permission notice appear in all copies.
*/
#define DBG_DBG 8
#define DBG_INFO 16
#define DBG_WARN 32
#define DBG_ERR 64
......
This diff is collapsed.
......@@ -18,8 +18,8 @@ TLSCertificateKeyPassword follow the white rabbit
#listenUDP localhost
#listenTCP 10.10.10.10:2084
#ListenTCP [2001:700:1:7:215:f2ff:fe35:307d]:2084
# Optional log level. 2 is default, 1 is less, 3 is more
#LogLevel 2
# Optional log level. 3 is default, 1 is less, 4 is more
#LogLevel 3
#Optional LogDestinatinon, else stderr used for logging
# Logging to file
#LogDestination file:///tmp/rp.log
......@@ -28,4 +28,3 @@ TLSCertificateKeyPassword follow the white rabbit
# LOG_LOCAL0, ..., LOG_LOCAL7
#LogDestination x-syslog://
#LogDestination x-syslog://log_local2
......@@ -6,7 +6,7 @@
* copyright notice and this permission notice appear in all copies.
*/
#define DEBUG_LEVEL 2
#define DEBUG_LEVEL 3
#define CONFIG_MAIN "/etc/radsecproxy/radsecproxy.conf"
#define CONFIG_SERVERS "/etc/radsecproxy/servers.conf"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment