X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Futils%2Ftest_logger.rs;h=5e5817e23f1f92d18f5d83406db2cff23319491d;hb=e9bd893447d77e417ab7fed49365076ba390c495;hp=cd037ad8187d8c42895b1a92abd3a37dfe2b5c8f;hpb=4dc0dd17c00c55055e7cd3256c1cf17834055cbf;p=rust-lightning diff --git a/fuzz/src/utils/test_logger.rs b/fuzz/src/utils/test_logger.rs index cd037ad81..5e5817e23 100644 --- a/fuzz/src/utils/test_logger.rs +++ b/fuzz/src/utils/test_logger.rs @@ -1,8 +1,17 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + use lightning::util::logger::{Logger, Record}; use std::sync::{Arc, Mutex}; use std::io::Write; -pub trait Output : Clone + Sync + Send + 'static { +pub trait Output : Clone + 'static { fn locked_write(&self, data: &[u8]); } @@ -47,9 +56,9 @@ impl<'a, Out: Output> Write for LockedWriteAdapter<'a, Out> { } impl Logger for TestLogger { - fn log(&self, record: &Record) { + fn log(&self, record: Record) { write!(LockedWriteAdapter(&self.out), - "{:<5} {} [{} : {}, {}] {}\n", record.level.to_string(), self.id, record.module_path, record.file, record.line, record.args) + "{:<5} {} [{} : {}] {}\n", record.level.to_string(), self.id, record.module_path, record.line, record.args) .unwrap(); } }