mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-27 00:06:34 +01:00
12 lines
338 B
Rust
12 lines
338 B
Rust
use lightning::util::logger::{Logger, Record};
|
|
|
|
pub struct TestLogger {}
|
|
|
|
impl Logger for TestLogger {
|
|
fn log(&self, record: &Record) {
|
|
#[cfg(test)]
|
|
println!("{:<5} [{} : {}, {}] {}", record.level.to_string(), record.module_path, record.file, record.line, record.args);
|
|
#[cfg(not(test))]
|
|
let _ = format!("{}", record.args);
|
|
}
|
|
}
|