Skip to content

a1ecbr0wn/call_logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A logger that calls another application for every logged item

Resources

License

Security policy

Stars

Watchers

Forks

Languages