Avoid unwanted log messages during startup.
[paraslash.git] / play.c
diff --git a/play.c b/play.c
index 83d2851..814ec16 100644 (file)
--- a/play.c
+++ b/play.c
@@ -178,9 +178,9 @@ static void parse_config_or_die(int argc, char *argv[])
 
        play_cmdline_parser_ext(argc, argv, &conf, &params);
        HANDLE_VERSION_FLAG("play", conf);
+       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        if (conf.help_given || conf.detailed_help_given)
                print_help_and_die();
-       loglevel = get_loglevel_by_name(conf.loglevel_arg);
        if (conf.config_file_given)
                config_file = para_strdup(conf.config_file_arg);
        else {
@@ -197,6 +197,7 @@ static void parse_config_or_die(int argc, char *argv[])
                params.initialize = 0;
                params.check_required = 1;
                play_cmdline_parser_config_file(config_file, &conf, &params);
+               loglevel = get_loglevel_by_name(conf.loglevel_arg);
        }
        for (i = 0; i < conf.key_map_given; i++) {
                char *s = strchr(conf.key_map_arg[i] + 1, ':');