From 03e1fb1f90ce5364ee4e8691d892bb212663fd33 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Tue, 24 Dec 2013 01:41:43 +0100 Subject: [PATCH] Set log level earlier Signed-off-by: Sebastian Ramacher --- main.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index a0982ab..bacc52d 100644 --- a/main.c +++ b/main.c @@ -85,6 +85,15 @@ main(int argc, char* argv[]) } g_option_context_free(context); + /* Set log level. */ + if (loglevel == NULL || g_strcmp0(loglevel, "info") == 0) { + girara_set_debug_level(GIRARA_INFO); + } else if (g_strcmp0(loglevel, "warning") == 0) { + girara_set_debug_level(GIRARA_WARNING); + } else if (g_strcmp0(loglevel, "error") == 0) { + girara_set_debug_level(GIRARA_ERROR); + } + if (synctex_fwd != NULL) { if (argc != 2) { girara_error(_("Too many arguments or missing filename while running with --syntex-forward")); @@ -109,15 +118,6 @@ main(int argc, char* argv[]) setsid(); } - /* Set log level. */ - if (loglevel == NULL || g_strcmp0(loglevel, "info") == 0) { - girara_set_debug_level(GIRARA_INFO); - } else if (g_strcmp0(loglevel, "warning") == 0) { - girara_set_debug_level(GIRARA_WARNING); - } else if (g_strcmp0(loglevel, "error") == 0) { - girara_set_debug_level(GIRARA_ERROR); - } - zathura_set_xid(zathura, embed); zathura_set_config_dir(zathura, config_dir); zathura_set_data_dir(zathura, data_dir);