mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-20 04:03:26 +01:00
[diagnostics]: Added switches for OperationLogging to use them for debugging/diagnostics on device
This commit is contained in:
@@ -39,7 +39,8 @@ class ResultOperation<ResultType>: Operation
|
||||
}
|
||||
|
||||
// Diagnostics: perform verbose logging of the operations only if enabled (so as to not flood console logs)
|
||||
if UserDefaults.standard.isVerboseOperationsLoggingEnabled {
|
||||
let isLoggingEnabledForThisOperation = OperationsLoggingControl.getFromDatabase(for: type(of: self))
|
||||
if UserDefaults.standard.isVerboseOperationsLoggingEnabled && isLoggingEnabledForThisOperation {
|
||||
// diagnostics logging
|
||||
let resultStatus = String(describing: result).prefix("success".count).uppercased()
|
||||
print("\n ====> OPERATION: `\(type(of: self))` completed with: \(resultStatus) <====\n\n" +
|
||||
|
||||
Reference in New Issue
Block a user