diff --git a/Logger/Loggers/DiskLogger/DiskLogger.swift b/Logger/Loggers/DiskLogger/DiskLogger.swift index 6718d09..c2a44d0 100644 --- a/Logger/Loggers/DiskLogger/DiskLogger.swift +++ b/Logger/Loggers/DiskLogger/DiskLogger.swift @@ -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) }