You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
422 B
Rust

pub use log::{debug, error, info, set_logger, set_max_level, trace, warn, LevelFilter};
use log::{Metadata, Record};
pub struct Log;
impl log::Log for Log {
fn enabled(&self, _metadata: &Metadata) -> bool {
true
}
fn log(&self, record: &Record) {
if self.enabled(record.metadata()) {
println!("{} - {}", record.level(), record.args());
}
}
fn flush(&self) {}
}