Skip to content

Commit e8110ab

Browse files
committed
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.
1 parent e7560c8 commit e8110ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/util/test_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl TestLogger {
439439
impl Logger for TestLogger {
440440
fn log(&self, record: &Record) {
441441
*self.lines.lock().unwrap().entry((record.module_path.to_string(), format!("{}", record.args))).or_insert(0) += 1;
442-
if self.level >= record.level {
442+
if record.level >= self.level {
443443
println!("{:<5} {} [{} : {}, {}] {}", record.level.to_string(), self.id, record.module_path, record.file, record.line, record.args);
444444
}
445445
}

0 commit comments

Comments
 (0)