hmm how do you debug a shell
parent
1f46fe5bb7
commit
05c3d0832c
@ -0,0 +1,19 @@
|
||||
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) {}
|
||||
}
|
Loading…
Reference in New Issue