mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
[diagnostics]: added logging for all operation types and their invocations
This commit is contained in:
@@ -37,6 +37,12 @@ class ResultOperation<ResultType>: Operation
|
|||||||
let error = nsError.withLocalizedFailure(localizedFailure)
|
let error = nsError.withLocalizedFailure(localizedFailure)
|
||||||
result = .failure(error)
|
result = .failure(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// diagnostics logging
|
||||||
|
let resultStatus = String(describing: result).prefix("success".count).uppercased()
|
||||||
|
print("\n ====> OPERATION: `\(type(of: self))` completed with: \(resultStatus) <====\n\n" +
|
||||||
|
" Result: \(result)\n")
|
||||||
|
|
||||||
self.resultHandler?(result)
|
self.resultHandler?(result)
|
||||||
|
|
||||||
super.finish()
|
super.finish()
|
||||||
|
|||||||
Reference in New Issue
Block a user