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:
@@ -9,6 +9,7 @@
|
||||
import Foundation
|
||||
import Account
|
||||
import Secrets
|
||||
import RSCore
|
||||
|
||||
public enum ArticleExtractorState {
|
||||
case ready
|
||||
@@ -23,7 +24,7 @@ protocol ArticleExtractorDelegate {
|
||||
func articleExtractionDidComplete(extractedArticle: ExtractedArticle)
|
||||
}
|
||||
|
||||
class ArticleExtractor {
|
||||
class ArticleExtractor: Logging {
|
||||
|
||||
private var dataTask: URLSessionDataTask? = nil
|
||||
|
||||
@@ -91,6 +92,7 @@ class ArticleExtractor {
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
self.logger.error("Failed to extract article: \(error.localizedDescription, privacy: .public)")
|
||||
self.state = .failedToParse
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.articleExtractionDidFail(with: error)
|
||||
|
||||
Reference in New Issue
Block a user