summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-15 16:14:09 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-10-15 18:17:49 +0200
commitedfb521a21c44f7b4c91d4ef6bffd84f2c241363 (patch)
tree4c0fc4127cdd312d43a5f1353baef1359c0db715
parent44386fc156bfa2d623567ff7f7c8f313cfafb9bc (diff)
journalctl: skip informational messages in export/json modes
-rw-r--r--src/journal/journalctl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 34017484be..9fbc9a3489 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':