Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

reduce noisy logging

laurenspriem89538e109723
diff --git a/mobile/apps/photos/lib/services/machine_learning/compute_controller.dart b/mobile/apps/photos/lib/services/machine_learning/compute_controller.dart
index 2d56ece0f8..f79b0c19f4 100644
--- a/mobile/apps/photos/lib/services/machine_learning/compute_controller.dart
+++ b/mobile/apps/photos/lib/services/machine_learning/compute_controller.dart
@@ -64,6 +64,7 @@ class ComputeController {
void _setDeviceHealth(bool healthy) {
if (_isDeviceHealthy == healthy) return;
_isDeviceHealthy = healthy;
+ _logger.info("Device health changed, healthy: $healthy");
Bus.instance.fire(DeviceHealthChangedEvent(healthy));
}
@@ -299,21 +300,22 @@ class ComputeController {
void _onAndroidBatteryStateUpdate(AndroidBatteryInfo? batteryInfo) {
_androidLastBatteryInfo = batteryInfo;
- _logger.info("Battery info: ${batteryInfo!.toJson()}");
_setDeviceHealth(_computeIsAndroidDeviceHealthy());
_fireControlEvent();
}
void _oniOSBatteryStateUpdate(IosBatteryInfo? batteryInfo) {
_iosLastBatteryInfo = batteryInfo;
- _logger.info("Battery info: ${batteryInfo!.toJson()}");
_setDeviceHealth(_computeIsiOSDeviceHealthy());
_fireControlEvent();
}
void _onThermalStateUpdate(ThermalStatus? thermalStatus) {
+ final changed = _lastThermalStatus != thermalStatus;
_lastThermalStatus = thermalStatus;
- _logger.info("Thermal status: $thermalStatus");
+ if (changed) {
+ _logger.info("Thermal status changed, status: $thermalStatus");
+ }
_setDeviceHealth(
Platform.isAndroid
? _computeIsAndroidDeviceHealthy()