diff options
author | zhmylove <zhmylove@narod.ru> | 2022-08-30 17:50:19 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-06-16 09:31:47 +0200 |
commit | 61cecfa0d8b3ee41ebd493b255b8201653d51b98 (patch) | |
tree | 926f5ea4d7b1899e2d9931c506e6b115ed2f6028 /src/shared/logs-show.c | |
parent | Merge pull request #28053 from mrc0mmand/assorted-fixes (diff) | |
download | systemd-61cecfa0d8b3ee41ebd493b255b8201653d51b98.tar.xz systemd-61cecfa0d8b3ee41ebd493b255b8201653d51b98.zip |
journalctl: add --truncate-newline option
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r-- | src/shared/logs-show.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index e0b85588bb..f467d844aa 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -524,6 +524,9 @@ static int output_short( if (!(flags & OUTPUT_SHOW_ALL)) strip_tab_ansi(&message, &message_len, highlight_shifted); + if (flags & OUTPUT_TRUNCATE_NEWLINE) + truncate_nl_full(message, &message_len); + if (priority_len == 1 && *priority >= '0' && *priority <= '7') p = *priority - '0'; |