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)
|
||||
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)
|
||||
|
||||
super.finish()
|
||||
|
||||
Reference in New Issue
Block a user