summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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':