Crates.io | dev-logger |
lib.rs | dev-logger |
version | 0.1.0 |
source | src |
created_at | 2023-10-21 16:44:58.386364 |
updated_at | 2023-10-21 16:44:58.386364 |
description | Based on `env_logger` but no need to set env. |
homepage | |
repository | |
max_upload_size | |
id | 1010108 |
size | 98,069 |
Based on env_logger
but no need to set env.
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");
}
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");
}