diff --git a/FreeAPS/Sources/APS/DeviceDataManager.swift b/FreeAPS/Sources/APS/DeviceDataManager.swift index b197a29f6..b63527506 100644 --- a/FreeAPS/Sources/APS/DeviceDataManager.swift +++ b/FreeAPS/Sources/APS/DeviceDataManager.swift @@ -459,7 +459,6 @@ extension BaseDeviceDataManager: PumpManagerDelegate { completion: @escaping (_ error: Error?) -> Void ) { dispatchPrecondition(condition: .onQueue(processQueue)) - debug(.deviceManager, "New pump events:\n\(events.map(\.title).joined(separator: "\n"))") // filter buggy TBRs > maxBasal from MDT let events = events.filter { diff --git a/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift b/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift index c9948bd8f..4282eb74e 100644 --- a/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift +++ b/FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift @@ -168,14 +168,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P } healthKitStore.save(samplesToSave) { (success: Bool, error: Error?) -> Void in - if success { - for sample in samplesToSave { - debug( - .service, - "Stored blood glucose \(sample.quantity) in HealthKit Store! Metadata: \(String(describing: sample.metadata?.values))" - ) - } - } else { + if !success { debug(.service, "Failed to store blood glucose in HealthKit Store!") debug(.service, error?.localizedDescription ?? "Unknown error") } @@ -220,14 +213,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P } healthKitStore.save(samplesToSave) { (success: Bool, error: Error?) -> Void in - if success { - for sample in samplesToSave { - debug( - .service, - "Stored carb entry \(sample.quantity) in HealthKit Store! Metadata: \(String(describing: sample.metadata?.values))" - ) - } - } else { + if !success { debug(.service, "Failed to store carb entry in HealthKit Store!") debug(.service, error?.localizedDescription ?? "Unknown error") } @@ -296,14 +282,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P } healthKitStore.save(bolusSamples + basalSamples) { (success: Bool, error: Error?) -> Void in - if success { - for sample in bolusSamples + basalSamples { - debug( - .service, - "Stored insulin entry in HealthKit Store! Metadata: \(String(describing: sample.metadata?.values))" - ) - } - } else { + if !success { debug(.service, "Failed to store insulin entry in HealthKit Store!") debug(.service, error?.localizedDescription ?? "Unknown error") } @@ -491,7 +470,6 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P private func prepareBGSamplesToPublisherFetch(_ samples: [HKQuantitySample]) { dispatchPrecondition(condition: .onQueue(processQueue)) - debug(.service, "Start preparing samples: \(String(describing: samples))") newGlucose += samples .compactMap { sample -> HealthKitSample? in @@ -520,11 +498,6 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P .filter { $0.dateString >= Date().addingTimeInterval(-1.days.timeInterval) } newGlucose = newGlucose.removeDublicates() - - debug( - .service, - "Current BloodGlucose.Type objects will be send from Publisher during fetch: \(String(describing: newGlucose))" - ) } // MARK: - GlucoseSource @@ -540,9 +513,7 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P } self.processQueue.async { - // debug(.service, "Start fetching HealthKitManager") guard self.settingsManager.settings.useAppleHealth else { - debug(.service, "HealthKitManager cant return any data, because useAppleHealth option is disable") promise(.success([])) return }