diff options
| author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-10-15 16:14:09 +0000 | 
|---|---|---|
| committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-10-15 18:17:49 +0200 | 
| commit | edfb521a21c44f7b4c91d4ef6bffd84f2c241363 (patch) | |
| tree | 4c0fc4127cdd312d43a5f1353baef1359c0db715 | |
| parent | 44386fc156bfa2d623567ff7f7c8f313cfafb9bc (diff) | |
journalctl: skip informational messages in export/json modes
| -rw-r--r-- | src/journal/journalctl.c | 9 | 
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': | 
