Move rad_debug_lvl into src/main.log
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 May 2015 18:31:36 +0000 (14:31 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 5 May 2015 18:31:36 +0000 (14:31 -0400)
So we don't have to define it for every utility that uses the server library

src/main/log.c
src/main/radattr.c
src/main/radiusd.c
src/main/radmin.c
src/main/radwho.c
src/main/unittest.c

index 2613a0a..10d005e 100644 (file)
@@ -46,7 +46,8 @@ RCSID("$Id$")
 #include <pthread.h>
 #endif
 
-static bool rate_limit = true;
+log_lvl_t      rad_debug_lvl = 0;              //!< Global debugging level
+static bool    rate_limit = true;              //!< Whether repeated log entries should be rate limited
 
 /** Maps log categories to message prefixes
  */
index fffbf8b..b50b6e5 100644 (file)
@@ -41,7 +41,6 @@ typedef struct REQUEST REQUEST;
 
 #include <freeradius-devel/log.h>
 extern log_lvl_t rad_debug_lvl;
-log_lvl_t rad_debug_lvl = 0;
 
 #include <sys/wait.h>
 pid_t rad_fork(void);
index cd84038..ecaf90c 100644 (file)
@@ -54,13 +54,12 @@ RCSID("$Id$")
 /*
  *  Global variables.
  */
-char const *progname = NULL;
-char const *radacct_dir = NULL;
-char const *radlog_dir = NULL;
-char const *radlib_dir = NULL;
-bool log_stripped_names;
-log_lvl_t rad_debug_lvl = 0;
-bool check_config = false;
+char const     *progname = NULL;
+char const     *radacct_dir = NULL;
+char const     *radlog_dir = NULL;
+char const     *radlib_dir = NULL;
+bool           log_stripped_names;
+bool           check_config = false;
 
 char const *radiusd_version = "FreeRADIUS Version " RADIUSD_VERSION_STRING
 #ifdef RADIUSD_VERSION_COMMIT
index 6f75243..aeabb23 100644 (file)
@@ -77,7 +77,6 @@ static char const *radmin_version = "radmin version " RADIUSD_VERSION_STRING
  *     they're running inside of the server.  And we don't (yet)
  *     have a "libfreeradius-server", or "libfreeradius-util".
  */
-log_lvl_t rad_debug_lvl = 0;
 main_config_t main_config;
 
 bool check_config = false;
index 1aeceef..e315a1e 100644 (file)
@@ -45,7 +45,6 @@ static char const *eol = "\n";
 static int showname = -1;
 static int showptype = 0;
 static int showcid = 0;
-log_lvl_t rad_debug_lvl = 0;
 char const *progname = "radwho";
 char const *radlog_dir = NULL;
 
index 3d63e4f..101d8a8 100644 (file)
@@ -41,7 +41,6 @@ char const *progname = NULL;
 char const *radacct_dir = NULL;
 char const *radlog_dir = NULL;
 char const *radlib_dir = NULL;
-log_lvl_t rad_debug_lvl = 0;
 bool check_config = false;
 bool log_stripped_names = false;