Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 699 Bytes

README.md

File metadata and controls

34 lines (26 loc) · 699 Bytes

primitive implementation of log for Rust

usage

#[allow(unused_imports)]
use raalog::{debug, error, info, trace, warn};

fn main() -> anyhow::Result<()> {
    let log_backend = std::env::args().nth(1).expect("no file for logging");
    println!("\n----> {}", log_backend);

    raalog::init()?
        .set_file_mode(&log_backend)?
        .set_level(raalog::LevelFilter::Trace);

    log::error!("mini error");
    log::info!("mini info");

    Ok(())
}

not implemented (yet)

  • flush()

logging modes

  • silent
  • to Buffer
  • to StdErr
  • to StdOut
  • to File

others

  • multi-line