From 6d92b28b7057ec49ea5a91da8be3bb297add2f47 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 2 Sep 2024 12:24:31 +0200 Subject: [PATCH] Log only after crun context has been setup We should log only after the context setup, otherwise we may use the wrong format or target. Signed-off-by: Sascha Grunert --- src/crun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crun.c b/src/crun.c index 1dfab9978a..684a5bc908 100644 --- a/src/crun.c +++ b/src/crun.c @@ -116,6 +116,9 @@ init_libcrun_context (libcrun_context_t *con, const char *id, struct crun_global return ret; } + libcrun_set_verbosity (arguments.verbosity); + libcrun_debug ("Using debug verbosity"); + if (con->bundle == NULL) con->bundle = "."; @@ -417,9 +420,6 @@ main (int argc, char **argv) if (command == NULL) libcrun_fail_with_error (0, "unknown command %s", argv[first_argument]); - libcrun_set_verbosity (arguments.verbosity); - libcrun_debug ("Using debug verbosity"); - ret = command->handler (&arguments, argc - first_argument, argv + first_argument, &err); if (ret && err) libcrun_fail_with_error (err->status, "%s", err->msg);