Skip to content

Commit 1e88c6a

Browse files
committed
docs: explain the json log format in more detail
1 parent 7242aed commit 1e88c6a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/content/docs.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,9 +1545,16 @@ This option is only supported Windows platforms.
15451545

15461546
### --use-json-log ###
15471547

1548-
This switches the log format to JSON for rclone. The fields of JSON
1549-
log are `level`, `msg`, `source`, `time`. The JSON logs will be
1550-
printed on a single line, but are shown expanded here for clarity.
1548+
This switches the log format to JSON. The log messages are then
1549+
streamed as individual JSON objects, with fields: `level`, `msg`, `source`,
1550+
and `time`. The resulting format is what is sometimes referred to as
1551+
[newline-delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming#Newline-delimited_JSON)
1552+
(NDJSON), or JSON Lines (JSONL). This is well suited for processing by
1553+
traditional line-oriented tools and shell pipelines, but a complete log
1554+
file is not strictly valid JSON and needs a parser that can handle it.
1555+
1556+
The JSON logs will be printed on a single line, but are shown expanded
1557+
here for clarity.
15511558

15521559
```json
15531560
{

0 commit comments

Comments
 (0)