Skip to content

Commit

Permalink
Merge pull request #499 from giuseppe/crun-change-default-verbosity-t…
Browse files Browse the repository at this point in the history
…o-error

libcrun: set default verbosity to ERROR
  • Loading branch information
rhatdan authored Sep 23, 2020
2 parents 0f87f91 + c90e000 commit b6a79bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/crun.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ main (int argc, char **argv)
if (command == NULL)
libcrun_fail_with_error (0, "unknown command %s", argv[first_argument]);

if (arguments.debug)
libcrun_set_verbosity (LIBCRUN_VERBOSITY_WARNING);

ret = command->handler (&arguments, argc - first_argument, argv + first_argument, &err);
if (ret && err)
libcrun_fail_with_error (err->status, "%s", err->msg);
Expand Down
2 changes: 1 addition & 1 deletion src/libcrun/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ log_write_to_journald (int errno_, const char *msg, bool warning, void *arg arg_

static crun_output_handler output_handler = log_write_to_stderr;
static void *output_handler_arg = NULL;
static int output_verbosity = LIBCRUN_VERBOSITY_WARNING;
static int output_verbosity = LIBCRUN_VERBOSITY_ERROR;

void
libcrun_set_verbosity (int verbosity)
Expand Down

0 comments on commit b6a79bc

Please sign in to comment.