Struct slog_json::Format [] [src]

pub struct Format {
    // some fields omitted
}

Json formatter

Each record will be printed as a Json map.

Methods

impl Format
[src]

Create new Json formatter

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

Use Format::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 Format
[src]

Format one logging record and write into io