slog-html - HTML format for slog-stream of slog-rs
#[macro_use]
extern crate slog;
extern crate slog_html;
extern crate slog_stream;
use slog::DrainExt;
use std::fs::OpenOptions;
fn main() {
let file = OpenOptions::new()
.create(true)
.write(true)
.truncate(true)
.open("target/log.html").unwrap();
let log = slog::Logger::root(
slog_stream::stream(
file,
slog_html::default()
).fuse(),
o!("version" => env!("CARGO_PKG_VERSION"))
);
debug!(log, "debug values"; "x" => 1, "y" => -1);
}
Compact mode:
Full mode: