Steal rust-crypto's ChaCha20 implementation wholesale
[rust-lightning] / fuzz / fuzz_targets / utils / test_logger.rs
index 4446897bef8d6f798482fced5bf1d24fa66e9053..f828d0638f17726690c2c9b83807866c634287bd 100644 (file)
@@ -1,23 +1,12 @@
-use lightning::util::logger::{Logger, Level, Record};
+use lightning::util::logger::{Logger, Record};
 
-pub struct TestLogger {
-       level: Level,
-}
-
-impl TestLogger {
-       pub fn new() -> TestLogger {
-               TestLogger {
-                       level: Level::Off,
-               }
-       }
-       pub fn enable(&mut self, level: Level) {
-               self.level = level;
-       }
-}
+pub struct TestLogger {}
 
 impl Logger for TestLogger {
        fn log(&self, record: &Record) {
-               #[cfg(any(test, not(feature = "fuzztarget")))]
+               #[cfg(test)]
                println!("{:<5} [{} : {}, {}] {}", record.level.to_string(), record.module_path, record.file, record.line, record.args);
+               #[cfg(not(test))]
+               let _ = format!("{}", record.args);
        }
 }