Struct slog_json::FormatBuilder
[−]
[src]
pub struct FormatBuilder { /* fields omitted */ }
Json formatter builder
Create with Format::build
.
Methods
impl FormatBuilder
[src]
fn build(self) -> Format
Build Json
format
This consumes the builder.
fn set_newlines(self, enabled: bool) -> Self
Set writing a newline after ever log record
fn add_key_values(self, values: Vec<OwnedKeyValue>) -> Self
Add custom values to be printed with this formatter
fn add_key_value(self, value: OwnedKeyValue) -> Self
Add custom values to be printed with this formatter
fn add_default_keys(self) -> Self
Add default key-values:
* ts
- timestamp
* level
- record logging level name
* msg
- msg - formatted logging message