fixed RotatingLogger after migrating to new arrayvec
This commit is contained in:
parent
d793019607
commit
0f0a056225
@ -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