mirror of
https://github.com/wnagrodzki/SwiftLogger.git
synced 2025-04-07 04:51:52 +02:00
Improved DiskLogger so rotateLogFiles() method's errors are caught instead of being ignored
This commit is contained in:
parent
0429d58fdc
commit
c83f341d6d
1 changed files with 7 additions and 5 deletions
|
@ -65,11 +65,13 @@ public final class DiskLogger: Logger {
|
||||||
|
|
||||||
do {
|
do {
|
||||||
try self.openFileWriter()
|
try self.openFileWriter()
|
||||||
try self.writeBuffer()
|
do {
|
||||||
}
|
try self.writeBuffer()
|
||||||
catch is FileWriter.FileSizeLimitReached {
|
}
|
||||||
self.closeFileWriter()
|
catch is FileWriter.FileSizeLimitReached {
|
||||||
try? self.rotateLogFiles()
|
self.closeFileWriter()
|
||||||
|
try self.rotateLogFiles()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
let message = String(describing: error)
|
let message = String(describing: error)
|
||||||
|
|
Loading…
Add table
Reference in a new issue