#logging #applications #call #another #events #logged #formatted

call_logger

A logger that calls another application for every logged item

7 releases

0.1.0 Mar 8, 2024
0.0.6 Feb 24, 2024
0.0.5 Mar 13, 2023

#292 in Debugging

Download history 1/week @ 2024-01-10 10/week @ 2024-01-17 8/week @ 2024-01-24 2/week @ 2024-02-14 170/week @ 2024-02-21 34/week @ 2024-02-28 232/week @ 2024-03-06 49/week @ 2024-03-13 16/week @ 2024-03-20 8/week @ 2024-03-27 13/week @ 2024-04-03

97 downloads per month

Apache-2.0

18KB
324 lines

call_logger

Crates.io Crates.io Build Status docs.rs dependency status

A logger that calls another application for every logged item, passing a json formatted string that contains the details of the log event.

Usage

Use of the builder model to set up the logger to call a script called store_log:

use call_logger::CallLogger;
use log::LevelFilter;

fn main() {
    let _ = CallLogger::new()
        .with_level(LevelFilter::Info)
        .with_call_target("store_log".to_string())
        .with_local_timestamp()
        .init();
    log::info!("Hello logging world")
}

Features

  • timestamps - add a timestamp to the output

Contribute

This is just a general purpose logger that calls out to another process. If you have any ideas for missing features, please raise an issue or a PR.

Dependencies

~46–370KB