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]
fn new() -> Self
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.
fn build() -> FormatBuilder
Build a Json formatter with custom settings
fn new_nonewline() -> Self
Create new Json
format that does not add
newlines after each record.