diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-08-08 08:32:43 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-08-11 18:10:34 -0400 |
commit | b4b02cbeec04b51697bce1f4e439b9b7afae5393 (patch) | |
tree | 6e5997edb0e50d5c540e04e2b14bf3f4033178ea | |
parent | 94e0bd7db1d7ca8ab7f738cdab1d014241f5b225 (diff) |
logs-show: fix indentation for 2nd and later lines, show lines in full
Now --full will show long fields in full, like it already did
with --all.
-rw-r--r-- | src/shared/logs-show.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 51cd7d51c5..2270c3b030 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -135,9 +135,13 @@ static bool print_multiline(FILE *f, unsigned prefix, unsigned n_columns, Output e = ellipsize_mem(pos, len, n_columns - prefix, 90); if (!e) - fprintf(f, "%s%.*s%s\n", color_on, len, pos, color_off); + fprintf(f, "%*s%s%.*s%s\n", + continuation * prefix, "", + color_on, len, pos, color_off); else - fprintf(f, "%s%s%s\n", color_on, e, color_off); + fprintf(f, "%*s%s%s%s\n", + continuation * prefix, "", + color_on, e, color_off); } else { ellipsized = true; fputs("...\n", f); @@ -168,7 +172,7 @@ static int output_short( assert(f); assert(j); - sd_journal_set_data_threshold(j, flags & OUTPUT_SHOW_ALL ? 0 : PRINT_THRESHOLD); + sd_journal_set_data_threshold(j, flags & (OUTPUT_SHOW_ALL|OUTPUT_FULL_WIDTH) ? 0 : PRINT_THRESHOLD); JOURNAL_FOREACH_DATA_RETVAL(j, data, length, r) { |