mirror of
https://github.com/rclone/rclone.git
synced 2025-12-18 01:03:14 +00:00
docs: explain the json log format in more detail
This commit is contained in:
@@ -1545,9 +1545,16 @@ This option is only supported Windows platforms.
|
|||||||
|
|
||||||
### --use-json-log ###
|
### --use-json-log ###
|
||||||
|
|
||||||
This switches the log format to JSON for rclone. The fields of JSON
|
This switches the log format to JSON. The log messages are then
|
||||||
log are `level`, `msg`, `source`, `time`. The JSON logs will be
|
streamed as individual JSON objects, with fields: `level`, `msg`, `source`,
|
||||||
printed on a single line, but are shown expanded here for clarity.
|
and `time`. The resulting format is what is sometimes referred to as
|
||||||
|
[newline-delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming#Newline-delimited_JSON)
|
||||||
|
(NDJSON), or JSON Lines (JSONL). This is well suited for processing by
|
||||||
|
traditional line-oriented tools and shell pipelines, but a complete log
|
||||||
|
file is not strictly valid JSON and needs a parser that can handle it.
|
||||||
|
|
||||||
|
The JSON logs will be printed on a single line, but are shown expanded
|
||||||
|
here for clarity.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user