Struct s_structured_log::JsonLogger [] [src]

pub struct JsonLogger { /* fields omitted */ }

This logger is a implementation for log::Log trait.

Methods

impl JsonLogger
[src]

#[macro_use]
extern crate log;
#[macro_use]
extern crate s_structured_log;
extern crate serde_json;

use log::LogLevelFilter;
use s_structured_log::{JsonLogger, LoggerOutput};

fn main() {
    JsonLogger::init(LoggerOutput::Stderr, LogLevelFilter::Info);

    s_info!(json_object! {
        "key" => "value"
    });
}

Trait Implementations

impl Log for JsonLogger
[src]

Determines if a log message with the specified metadata would be logged. Read more

Logs the LogRecord. Read more