Merge pull request #7129 from paritytech/fix_logger
Fixed `RotatingLogger` after migrating to new arrayvec
This commit is contained in:
commit
06ff816afb
@ -66,7 +66,11 @@ impl RotatingLogger {
|
||||
|
||||
/// Append new log entry
|
||||
pub fn append(&self, log: String) {
|
||||
self.logs.write().insert(0, log);
|
||||
let mut logs = self.logs.write();
|
||||
if logs.is_full() {
|
||||
logs.pop();
|
||||
}
|
||||
logs.insert(0, log);
|
||||
}
|
||||
|
||||
/// Return levels
|
||||
|
Loading…
Reference in New Issue
Block a user