Load configuration file before setting logger options

Joachim Sehlstedt <[email protected]>
Newsgroups gmane.mail.perdition.user
Organization NewStyleData
Message-ID <[email protected]>
Hi,

if you have debug and/or quiet set in your configuration file instead of 
on the cmd line they are ignore when updating the logger options at 
start up.

--- a/perdition/perdition.old     2010-07-30 06:30:14.693804169 +0200
+++ b/perdition/perdition.c       2010-07-30 06:38:00.988554075 +0200
@@ -371,6 +371,11 @@
    /*Parse options*/
    options(argc, argv, OPT_FIRST_CALL);

+  /*Read config file*/
+  if(opt.config_file!=NULL){
+    config_file_to_opt(opt.config_file);
+  }
+
    /* Initialise setting of proctitle */
    init_set_proc_title(argc, argv, envp);
    progname = strdup(get_progname(argv[0]));
@@ -386,11 +391,6 @@
      vanessa_logger_change_max_priority(vanessa_logger_get(),
                                        opt.quiet?LOG_ERR:LOG_INFO);

-  /*Read config file*/
-  if(opt.config_file!=NULL){
-    config_file_to_opt(opt.config_file);
-  }
-
    /*Open the dbserver_get library, if we have a library*/
    if(getserver_openlib(opt.map_library, opt.map_library_opt,
          &handle, &dbserver_get, &dbserver_get2)<0){



greetings
JS
______________________________________________
Perdition-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/perdition-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.