diff --git a/Reader/ExcerptGenerator.swift b/Reader/ExcerptGenerator.swift index 96eb4e9..4f26a7c 100644 --- a/Reader/ExcerptGenerator.swift +++ b/Reader/ExcerptGenerator.swift @@ -45,7 +45,7 @@ public struct ExcerptGenerator { NSUpdatedObjectsKey: Array(updated) ], into: [fervorController.persistentContainer.viewContext]) } catch { - logger.error("Unable to save context: \(error.localizedDescription, privacy: .public)") + logger.error("Unable to save context: \(String(describing: error), privacy: .public)") } } } diff --git a/Reader/FervorController.swift b/Reader/FervorController.swift index ae7bff5..7f31afe 100644 --- a/Reader/FervorController.swift +++ b/Reader/FervorController.swift @@ -78,7 +78,7 @@ class FervorController { let _ = try await f(item.id!) count += 1 } catch { - logger.error("Failed to sync read state: \(error.localizedDescription, privacy: .public)") + logger.error("Failed to sync read state: \(String(describing: error), privacy: .public)") item.needsReadStateSync = true } } @@ -94,7 +94,7 @@ class FervorController { count += 1 item.needsReadStateSync = false } catch { - logger.error("Failed to sync read state again: \(error.localizedDescription, privacy: .public)") + logger.error("Failed to sync read state again: \(String(describing: error), privacy: .public)") item.needsReadStateSync = true // todo: this should probably fail after a certain number of attempts } @@ -106,7 +106,7 @@ class FervorController { do { try persistentContainer.viewContext.save() } catch { - logger.error("Failed to save view context: \(error.localizedDescription, privacy: .public)") + logger.error("Failed to save view context: \(String(describing: error), privacy: .public)") } } @@ -118,7 +118,7 @@ class FervorController { _ = try await f(item.id!) item.needsReadStateSync = false } catch { - logger.error("Failed to mark item (un)read: \(error.localizedDescription, privacy: .public)") + logger.error("Failed to mark item (un)read: \(String(describing: error), privacy: .public)") item.needsReadStateSync = true } @@ -126,7 +126,7 @@ class FervorController { do { try persistentContainer.viewContext.save() } catch { - logger.error("Failed to save view context: \(error.localizedDescription, privacy: .public)") + logger.error("Failed to save view context: \(String(describing: error), privacy: .public)") } } } diff --git a/Reader/SceneDelegate.swift b/Reader/SceneDelegate.swift index 3dc35db..1feccfc 100644 --- a/Reader/SceneDelegate.swift +++ b/Reader/SceneDelegate.swift @@ -84,7 +84,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { do { try await fervorController.syncReadToServer() } catch { - logger.error("Unable to sync read state to server: \(error.localizedDescription, privacy: .public)") + logger.error("Unable to sync read state to server: \(String(describing: error), privacy: .public)") } } } @@ -113,7 +113,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { do { try await self.fervorController.syncAll() } catch { - logger.error("Unable to sync from server: \(error.localizedDescription, privacy: .public)") + logger.error("Unable to sync from server: \(String(describing: error), privacy: .public)") } ExcerptGenerator.generateAll(fervorController)