Fixed use of --verbose command line switch.
authorFranck Joncourt <franck@debian.org>
Mon, 24 Jun 2013 21:15:50 +0000 (23:15 +0200)
committerMichael Rash <mbr@cipherdyne.org>
Fri, 28 Jun 2013 01:39:38 +0000 (21:39 -0400)
Set default log verbosity to LOG_INFO in the log_msg driver.

server/config_init.c
server/log_msg.h

index eb5f41d..464c303 100644 (file)
@@ -685,31 +685,32 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
                 clean_exit(opts, NO_FW_CLEANUP, EXIT_SUCCESS);
                 break;
 
-        /* Look for configuration file arg.
-        */
-        case 'c':
-            set_config_entry(opts, CONF_CONFIG_FILE, optarg);
-            got_conf_file++;
+            /* Verbosity level */
+            case 'v':
+                opts->verbose++;
+                break;
 
-            /* If we already have the config_override option, we are done.
+            /* Look for configuration file arg.
             */
-            if(got_override_config > 0)
-                break;
+            case 'c':
+                set_config_entry(opts, CONF_CONFIG_FILE, optarg);
+                got_conf_file++;
 
-        /* Look for override configuration file arg.
-        */
-        case 'O':
-            set_config_entry(opts, CONF_OVERRIDE_CONFIG, optarg);
-            got_override_config++;
+                /* If we already have the config_override option, we are done.
+                */
+                if(got_override_config > 0)
+                    break;
 
-            /* If we already have the conf_file option, we are done.
+            /* Look for override configuration file arg.
             */
-            if(got_conf_file > 0)
-                break;
-        /* Verbosity level */
-        case 'v':
-            opts->verbose++;
-            break;
+            case 'O':
+                set_config_entry(opts, CONF_OVERRIDE_CONFIG, optarg);
+                got_override_config++;
+
+                /* If we already have the conf_file option, we are done.
+                */
+                if(got_conf_file > 0)
+                    break;
         }
     }
 
@@ -870,6 +871,9 @@ config_init(fko_srv_options_t *opts, int argc, char **argv)
             case 'S':
                 opts->status = 1;
                 break;
+            /* Verbosity level - handled previously */
+            case 'v':
+                break;
             case 'V':
                 fprintf(stdout, "fwknopd server %s\n", MY_VERSION);
                 clean_exit(opts, NO_FW_CLEANUP, EXIT_SUCCESS);
index f4bb258..e9c3392 100644 (file)
@@ -44,7 +44,7 @@
 #define LOG_STDERR_ONLY         (LOG_STDERR | LOG_WITHOUT_SYSLOG)
 #define LOG_VERBOSITY_MASK      0x0FFF
 
-#define LOG_DEFAULT_VERBOSITY   LOG_NOTICE     /*!< Default verbosity to use */
+#define LOG_DEFAULT_VERBOSITY   LOG_INFO     /*!< Default verbosity to use */
 
 void init_logging(fko_srv_options_t *opts);
 void free_logging(void);