diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-07-19 21:11:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-19 21:11:41 +0300 |
commit | 4526e15d064c77a61cf79c595c3384effd66d31b (patch) | |
tree | cae77d07c8dfd6680e519300004a96f81bbf285e /src/shared | |
parent | bb557f90f842fb9646a83fd3c21ba359bb8c0f28 (diff) | |
parent | 0d23bc57da6a3aeb1e7f92cfd7da2cd831b7c11c (diff) |
Merge pull request #3636 from poettering/logs-show-utf8
improve handling of trailing newline in journal logging
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/logs-show.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index 9351b85eed..d04728f505 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -489,7 +489,7 @@ static int output_verbose( off = ANSI_NORMAL; } - if (flags & OUTPUT_SHOW_ALL || + if ((flags & OUTPUT_SHOW_ALL) || (((length < PRINT_CHAR_THRESHOLD) || flags & OUTPUT_FULL_WIDTH) && utf8_is_printable(data, length))) { fprintf(f, " %s%.*s=", on, fieldlen, (const char*)data); @@ -607,7 +607,7 @@ void json_escape( if (!(flags & OUTPUT_SHOW_ALL) && l >= JSON_THRESHOLD) fputs("null", f); - else if (!utf8_is_printable(p, l)) { + else if (!(flags & OUTPUT_SHOW_ALL) && !utf8_is_printable(p, l)) { bool not_first = false; fputs("[ ", f); |