mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Health Connect: Move per-sample logging to TRACE
This commit is contained in:
+1
-1
@@ -404,7 +404,7 @@ public abstract class AbstractSampleProvider<T extends AbstractActivitySample> i
|
|||||||
T previousSample = it.next();
|
T previousSample = it.next();
|
||||||
|
|
||||||
if (LOG.isTraceEnabled()) {
|
if (LOG.isTraceEnabled()) {
|
||||||
LOG.trace("Starting filling gapps at {}", DateTimeUtils.formatDateTime(DateTimeUtils.parseTimestampMillis(previousSample.getTimestamp() * 1000L)));
|
LOG.trace("Starting filling gaps at {}", DateTimeUtils.formatDateTime(DateTimeUtils.parseTimestampMillis(previousSample.getTimestamp() * 1000L)));
|
||||||
}
|
}
|
||||||
|
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ internal abstract class AbstractActivitySampleSyncer<TRecord : Record> : Activit
|
|||||||
val startTs = endTs.minus(1, ChronoUnit.MINUTES)
|
val startTs = endTs.minus(1, ChronoUnit.MINUTES)
|
||||||
|
|
||||||
if (endTs.isBefore(sliceStartBoundary) || startTs.isAfter(sliceEndBoundary)) {
|
if (endTs.isBefore(sliceStartBoundary) || startTs.isAfter(sliceEndBoundary)) {
|
||||||
logger.debug(
|
logger.trace(
|
||||||
"Skipping {} for device '{}' for sample at {} (interval {} to {}) as its interval is outside the slice {} - {}.",
|
"Skipping {} for device '{}' for sample at {} (interval {} to {}) as its interval is outside the slice {} - {}.",
|
||||||
recordTypeName,
|
recordTypeName,
|
||||||
deviceName,
|
deviceName,
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ internal abstract class AbstractTimeSampleSyncer<TSample : TimeSample, TRecord :
|
|||||||
val recordsToInsert = samples.filter {
|
val recordsToInsert = samples.filter {
|
||||||
val timestamp = Instant.ofEpochMilli(it.timestamp)
|
val timestamp = Instant.ofEpochMilli(it.timestamp)
|
||||||
if (timestamp.isBefore(sliceStartBoundary) || timestamp.isAfter(sliceEndBoundary)) {
|
if (timestamp.isBefore(sliceStartBoundary) || timestamp.isAfter(sliceEndBoundary)) {
|
||||||
logger.debug(
|
logger.trace(
|
||||||
"Skipping sample for at {} as it's outside the slice {} - {}.",
|
"Skipping sample for at {} as it's outside the slice {} - {}.",
|
||||||
timestamp,
|
timestamp,
|
||||||
sliceStartBoundary,
|
sliceStartBoundary,
|
||||||
|
|||||||
+1
-1
@@ -115,7 +115,7 @@ internal object TemperatureSyncer : HealthConnectSyncer {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
LOG.debug(
|
LOG.trace(
|
||||||
"Skipping Body Temperature sample for device '{}' at {} (value: {}°C) as it's outside slice {} - {}.",
|
"Skipping Body Temperature sample for device '{}' at {} (value: {}°C) as it's outside slice {} - {}.",
|
||||||
deviceName,
|
deviceName,
|
||||||
timestamp,
|
timestamp,
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ internal object Vo2MaxSyncer : AbstractTimeSampleSyncer<Vo2MaxSample, Vo2MaxReco
|
|||||||
deviceName: String
|
deviceName: String
|
||||||
): Vo2MaxRecord? {
|
): Vo2MaxRecord? {
|
||||||
if (sample.value <= 0) {
|
if (sample.value <= 0) {
|
||||||
logger.debug("Skipping VO2Max sample for device '$deviceName' due to invalid value: ${sample.value}.")
|
logger.trace("Skipping VO2Max sample for device '$deviceName' due to invalid value: ${sample.value}.")
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user