mirror of
https://github.com/wnagrodzki/SwiftLogger.git
synced 2025-04-07 04:51:52 +02:00
Made DiskLogger errors to be appended to buffer instead of being logged to avoid potential infinite loop.
This commit is contained in:
parent
ec98042420
commit
c3e2462104
1 changed files with 3 additions and 2 deletions
|
@ -71,8 +71,9 @@ public final class DiskLogger: Logger {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
let message = String(describing: error)
|
let message = self.formatter.string(from: Date()) + " <" + LogLevel.warning.logDescription + "> " + String(describing: error)
|
||||||
self.log(message, level: .warning)
|
let data = Data(message.utf8)
|
||||||
|
self.buffer.append(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue