Struct slog_json::Json [] [src]

pub struct Json {
    // some fields omitted
}

Json formatter

Each record will be printed as a Json map.

Methods

impl Json
[src]

Create new Json format.

It comes with some default fields (ts, level, msg) and uses newlines.

Use Json::build() to build a custom Json formatter from scratch.

Build a Json formatter with custom settings

Create new Json format that does not add newlines after each record.

Trait Implementations

impl Format for Json
[src]

Format one logging record and write into io