xan-log

Crates.ioxan-log
lib.rsxan-log
version0.1.1
sourcesrc
created_at2023-10-28 06:46:18.435749
updated_at2023-11-10 02:06:58.28831
descriptionMy personal logger
homepage
repositoryhttps://github.com/Xanthorrhizol/xan-log
max_upload_size
id1016746
size5,198
Xanthorrhizol (Xanthorrhizol)

documentation

README

xan-log

Usage

  1. the logger will initialized with LOG_LEVEL env variable

list: off, trace, debug, info, warn, error both upper, lower case are parsable

  1. add log lib and extern it in your main.rs or lib.rs
#[macro_use]
extern crate log;
  1. init logger and use the macros
use xan_log::init_logger;

#[macro_use]
extern crate log;

fn main() {
    init_logger();
    error!("idk, some error: {}", "some error");
}
Commit count: 7

cargo fmt