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