Avoid unwanted log messages during startup.
[paraslash.git] / gui.c
diff --git a/gui.c b/gui.c
index e157dd1..5092315 100644 (file)
--- a/gui.c
+++ b/gui.c
@@ -1521,6 +1521,7 @@ int main(int argc, char *argv[])
 
        gui_cmdline_parser(argc, argv, &conf); /* exits on errors */
        HANDLE_VERSION_FLAG("gui", conf);
+       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        cf = configfile_exists();
        if (!cf && conf.config_file_given) {
                fprintf(stderr, "can not read config file %s\n",
@@ -1536,8 +1537,8 @@ int main(int argc, char *argv[])
                        .print_errors = 1,
                };
                gui_cmdline_parser_config_file(cf, &conf, &params);
+               loglevel = get_loglevel_by_name(conf.loglevel_arg);
        }
-       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        if (check_key_map_args() < 0) {
                fprintf(stderr, "invalid key map\n");
                exit(EXIT_FAILURE);