mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Logging changes
- Adds `Logging` protocol - Moves to Swift-style `OSLog` usage os_log to Logger os_log audit Replacment of os.log with Logging
This commit is contained in:
@@ -10,8 +10,9 @@ import UIKit
|
||||
import UserNotifications
|
||||
import Account
|
||||
import Zip
|
||||
import RSCore
|
||||
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
class SceneDelegate: UIResponder, UIWindowSceneDelegate, Logging {
|
||||
|
||||
var window: UIWindow?
|
||||
var coordinator: SceneCoordinator!
|
||||
@@ -184,7 +185,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
DispatchQueue.main.async {
|
||||
NotificationCenter.default.post(name: .didBeginDownloadingTheme, object: nil)
|
||||
}
|
||||
let task = URLSession.shared.downloadTask(with: request) { location, response, error in
|
||||
let task = URLSession.shared.downloadTask(with: request) { [weak self] location, response, error in
|
||||
guard
|
||||
let location = location else { return }
|
||||
|
||||
@@ -192,6 +193,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
||||
try ArticleThemeDownloader.shared.handleFile(at: location)
|
||||
} catch {
|
||||
NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error])
|
||||
self?.logger.error("Failed to import theme with error: \(error.localizedDescription, privacy: .public)")
|
||||
}
|
||||
}
|
||||
task.resume()
|
||||
|
||||
Reference in New Issue
Block a user