Expand description

An encoder which writes a JSON object.

Each log event will be written as a JSON object on its own line.

Requires the json_encoder feature.

Contents

An example object (note that real output will not be pretty-printed):

{
    "time": "2016-03-20T14:22:20.644420340-08:00",
    "message": "the log message",
    "module_path": "foo::bar",
    "file": "foo/bar/mod.rs",
    "line": 100,
    "level": "INFO",
    "target": "foo::bar",
    "thread": "main",
    "thread_id": 123,
    "mdc": {
        "request_id": "123e4567-e89b-12d3-a456-426655440000"
    }
}

Structs

An Encoder which writes a JSON object.

The JSON encoder’s configuration

A deserializer for the JsonEncoder.