[diagnostics]: added logging for all operation types and their invocations

This commit is contained in:
Magesh K
2024-12-13 20:19:05 +05:30
parent 6c60c2092c
commit 90c6c64e71

View File

@@ -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()