mirror of
https://github.com/wnagrodzki/SwiftLogger.git
synced 2025-04-05 20:11:53 +02:00
Fixed two bugs caught by unit tests in DiskLogger
This commit is contained in:
parent
cedf3a2b52
commit
677db8a73a
1 changed files with 3 additions and 1 deletions
|
@ -130,10 +130,12 @@ public final class DiskLogger: Logger {
|
|||
catch is SizeLimitedFileQuotaReached {
|
||||
self.closeSizeLimitedFile()
|
||||
try self.rotateLogFiles()
|
||||
try self.openSizeLimitedFile()
|
||||
try self.writeBuffer()
|
||||
}
|
||||
}
|
||||
catch {
|
||||
let message = self.formatter.string(from: Date()) + " <" + LogLevel.warning.logDescription + "> " + String(describing: error)
|
||||
let message = self.formatter.string(from: Date()) + " <" + LogLevel.warning.logDescription + "> " + String(describing: error) + "\n"
|
||||
let data = Data(message.utf8)
|
||||
self.buffer.append(data)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue