summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-30 17:41:19 -0700
committerLennart Poettering <lennart@poettering.net>2016-07-19 14:21:49 +0200
commit8980058a3715f2dc96f38373b9550ef4e5b83662 (patch)
tree2c43a27ca541f9952b315214c18ef83783e73dab /src/shared/logs-show.c
parentc24f1f9df1a79f413dc1cdad27341027e58d2a1f (diff)
journalctl: make sure that journalctl's --all switch also has an effect on json output
With this change, binary record data is formatted as string if --all is specified when using json output. This is inline with the effect of --all on the other available output modes. Fixes: #3416
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c4
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);