From 90c6c64e71af324bb97e7ecab43e9488be68bdf5 Mon Sep 17 00:00:00 2001 From: Magesh K <47920326+mahee96@users.noreply.github.com> Date: Fri, 13 Dec 2024 20:19:05 +0530 Subject: [PATCH] [diagnostics]: added logging for all operation types and their invocations --- AltStore/Operations/Operation.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AltStore/Operations/Operation.swift b/AltStore/Operations/Operation.swift index b0caaea1..0bf322dc 100644 --- a/AltStore/Operations/Operation.swift +++ b/AltStore/Operations/Operation.swift @@ -37,6 +37,12 @@ class ResultOperation: 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()