1 unstable release
0.1.0 | Oct 21, 2023 |
---|
#23 in #env-logger
15KB
81 lines
Dev-logger
Based on env_logger
but no need to set env.
Basic
use dev_logger;
#[macro_use]
extern crate log;
fn main() {
dev_logger::init();
function();
}
#[test]
fn test() {
dev_logger::init();
function();
}
fn function() {
error!("error");
warn!("warn");
info!("info");
debug!("debug");
trace!("trace");
}
Trace
use dev_logger;
#[macro_use]
extern crate log;
fn main() {
dev_logger::init_trace();
function();
}
#[test]
fn test() {
dev_logger::init_trace();
function();
}
fn function() {
error!("error");
warn!("warn");
info!("info");
debug!("debug");
trace!("trace");
}
Dependencies
~4–5.5MB
~88K SLoC