call_logger

Crates.iocall_logger
lib.rscall_logger
version
sourcesrc
created_at2023-03-07 00:07:15.198116
updated_at2024-12-08 23:20:38.239737
descriptionA logger that calls another application for every logged item
homepagehttps://github.com/a1ecbr0wn/call_logger
repositoryhttps://github.com/a1ecbr0wn/call_logger
max_upload_size
id803109
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Alec Brown (a1ecbr0wn)

documentation

https://docs.rs/call_logger

README

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.

Commit count: 21

cargo fmt