mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-02-06 08:04:57 +01:00
Set log level earlier
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
f5983a8429
commit
03e1fb1f90
1 changed files with 9 additions and 9 deletions
18
main.c
18
main.c
|
@ -85,6 +85,15 @@ main(int argc, char* argv[])
|
||||||
}
|
}
|
||||||
g_option_context_free(context);
|
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 (synctex_fwd != NULL) {
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
girara_error(_("Too many arguments or missing filename while running with --syntex-forward"));
|
girara_error(_("Too many arguments or missing filename while running with --syntex-forward"));
|
||||||
|
@ -109,15 +118,6 @@ main(int argc, char* argv[])
|
||||||
setsid();
|
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_xid(zathura, embed);
|
||||||
zathura_set_config_dir(zathura, config_dir);
|
zathura_set_config_dir(zathura, config_dir);
|
||||||
zathura_set_data_dir(zathura, data_dir);
|
zathura_set_data_dir(zathura, data_dir);
|
||||||
|
|
Loading…
Reference in a new issue