Procházet zdrojové kódy

add logging to processFetchedTargets()

polscm32 aka Marvout před 1 rokem
rodič
revize
a8d124bc69

+ 5 - 2
FreeAPS/Sources/Modules/Home/HomeStateModel+Setup/GlucoseTargetSetup.swift

@@ -20,7 +20,7 @@ extension Home.StateModel {
 
         // Ensure there are targets to process
         guard !rawTargets.targets.isEmpty else {
-            print("Warning: No targets to process in rawTargets.")
+            debugPrint("\(DebuggingIdentifiers.failed) Warning: No targets to process in rawTargets.")
             return []
         }
 
@@ -37,7 +37,7 @@ extension Home.StateModel {
 
             // Validate target index to ensure safety
             guard targetIndex < targets.count else {
-                print("Error: Invalid target index \(targetIndex).")
+                debugPrint("\(DebuggingIdentifiers.failed) Error: Invalid target index \(targetIndex).")
                 continue
             }
 
@@ -78,6 +78,9 @@ extension Home.StateModel {
             )
         }
 
+        //TODO: - remove this after bug is fixed
+        debugPrint("\(DebuggingIdentifiers.inProgress) printing target profiles: \(targetProfiles)")
+        
         return targetProfiles
     }
 }