From e8110ab33f44b647e142ad3357823a995ba68c5a Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 30 Jun 2021 02:19:28 +0000 Subject: [PATCH] Correct test log printing due to inverted comparison We changed the sort order of log levels to be more natural, but this comparison wasn't updated accordingly. Likely the reason it was left strange for so long is it also had the comparison argument ordering flipped. --- lightning/src/util/test_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs index b4d274f68..adaf631f8 100644 --- a/lightning/src/util/test_utils.rs +++ b/lightning/src/util/test_utils.rs @@ -439,7 +439,7 @@ impl TestLogger { impl Logger for TestLogger { fn log(&self, record: &Record) { *self.lines.lock().unwrap().entry((record.module_path.to_string(), format!("{}", record.args))).or_insert(0) += 1; - if self.level >= record.level { + if record.level >= self.level { println!("{:<5} {} [{} : {}, {}] {}", record.level.to_string(), self.id, record.module_path, record.file, record.line, record.args); } } -- 2.39.5