From edfb521a21c44f7b4c91d4ef6bffd84f2c241363 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 15 Oct 2012 16:14:09 +0000 Subject: [PATCH] journalctl: skip informational messages in export/json modes --- src/journal/journalctl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 34017484b..9fbc9a348 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -193,10 +193,17 @@ static int parse_argv(int argc, char *argv[]) { case 'o': arg_output = output_mode_from_string(optarg); if (arg_output < 0) { - log_error("Unknown output '%s'.", optarg); + log_error("Unknown output format '%s'.", optarg); return -EINVAL; } + if (arg_output == OUTPUT_EXPORT || + arg_output == OUTPUT_JSON || + arg_output == OUTPUT_JSON_PRETTY || + arg_output == OUTPUT_JSON_SSE || + arg_output == OUTPUT_CAT) + arg_quiet = true; + break; case 'a': -- 2.30.2