fn do_some_logging(store: &Store) {
    logger::init(store.clone());

    log!(log::Level::Info, msg: { "A structured {name}", name = "log" }, kvs: {
        id: 1,
        #[log(display)]
        name: "log",
        #[log(path)]
        path: "./monkey-path",
    });

    log!(log::Level::Warn, msg: { "A structured {name}", name = "log" }, kvs: {
        id: 2,
        #[log(serde)]
        err: json!({
            "cause": "something went wrong!",
            "backtrace": [
                "line 1 ...",
                "line 2 ...",
                "line 3 ..."
            ]
        })
    });
}
/**
Log some structured records to the store.
*/
Log some structured records to the store.
Log some structured records to the store .
fn do_some_logging(store: &Store) {
    logger::init(store.clone());
    log!(log::Level::Info, msg: { "A structured {name}", name = "log" }, kvs: {
        id: 1,
        #[log(display)]
        name: "log",
        #[log(path)]
        path: "./monkey-path",
    });
    log!(log::Level::Warn, msg: { "A structured {name}", name = "log" }, kvs: {
        id: 2,
        #[log(serde)]
        err: json!({
            "cause": "something went wrong!",
            "backtrace": [
                "line 1 ...",
                "line 2 ...",
                "line 3 ..."
            ]
        })
    });
}
fn do_some_logging ( store : & Store ) { logger :: init ( store . clone ( ) ) ; log ! ( log Level Info msg { " " name " " } kvs { id 1 [ log ( display ) ] name " " [ log ( path ) ] path " " } ) ; log ! ( log Level Warn msg { " " name " " } kvs { id 2 [ log ( serde ) ] err json ( { " " " " " " [ " " " " " " ] } ) } ) ; }
Log some structured records to the store.
Log some structured records to the store .
store
&Store