3 releases (1 stable)

Uses new Rust 2024

1.0.0 Mar 4, 2025
0.1.1 Nov 10, 2023
0.1.0 Oct 28, 2023

#350 in Debugging

Download history 3/week @ 2024-11-26 4/week @ 2024-12-03 5/week @ 2024-12-10 1/week @ 2025-02-04 133/week @ 2025-03-04

133 downloads per month
Used in korea-investment-api

MIT license

6KB
80 lines

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");
}

Dependencies

~1.4–2.3MB
~39K SLoC