loggers

Crates.iologgers
lib.rsloggers
version0.1.1
sourcesrc
created_at2024-10-04 10:48:52.089093
updated_at2024-10-04 10:53:18.227594
descriptionsimple logger
homepage
repository
max_upload_size
id1396376
size19,807
Aki (akitenkrad)

documentation

README

loggers

Loggers

Installation

cargo add loggers

Examples

use loggers::*;
let mut logger = Logger::new();
logger.add_logger(Box::new(CustomLogger::new(
    "test",
    "tests/output/system.log",
)));
logger.set_fallback(Box::new(CustomLogger::new(
    "default",
    "tests/output/system.log",
)));
log::set_boxed_logger(Box::new(logger)).expect("Failed to set logger");
log::set_max_level(log::LevelFilter::Trace);

info!(target:"test", "Hello, world!");
debug!("Default");

License: Apache-2.0

Commit count: 0

cargo fmt