Avoid unwanted log messages during startup.
[paraslash.git] / write.c
diff --git a/write.c b/write.c
index 866ea43..f4f757f 100644 (file)
--- a/write.c
+++ b/write.c
@@ -107,7 +107,6 @@ static int setup_and_schedule(void)
                },
        };
 
-       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        sit.btrn = btr_new_node(&(struct btr_node_description)
                EMBRACE(.name = "stdin"));
        stdin_set_defaults(&sit);
@@ -173,8 +172,9 @@ int main(int argc, char *argv[])
 {
        int ret;
 
-       writer_init();
        write_cmdline_parser(argc, argv, &conf);
+       loglevel = get_loglevel_by_name(conf.loglevel_arg);
+       writer_init();
        HANDLE_VERSION_FLAG("write", conf);
        if (conf.help_given || conf.detailed_help_given)
                print_help_and_die();