Made DiskLogger to log it's own errors on warning level

This commit is contained in:
Wojciech Nagrodzki 2018-08-21 22:12:43 +02:00
parent 41462ded26
commit fab84b153b
Signed by: wnagrodzki
GPG key ID: E9D0EB0302264569

View file

@ -57,7 +57,7 @@ public final class DiskLogger: Logger {
private func log(_ message: String) {
guard let data = message.data(using: .utf8) else {
log("Message failed to convert to UTF8")
log("Message failed to convert to UTF8", level: .warning)
return
}
queue.async {
@ -73,7 +73,7 @@ public final class DiskLogger: Logger {
}
catch {
let message = String(describing: error)
self.log(message)
self.log(message, level: .warning)
}
}
}