mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
fix(logging): Reduce PlayPause diagnostic noise
Remove Pre-distinct log that fired on every emission. Replace full PodDevice dump in Checking log with compact ear detection summary.
This commit is contained in:
@@ -53,12 +53,6 @@ class PlayPause @Inject constructor(
|
||||
}
|
||||
}
|
||||
// Cache persistence can update battery timestamps without changing any reaction-relevant state.
|
||||
.onEach { device ->
|
||||
log(TAG, VERBOSE) {
|
||||
val key = device?.toPlayPauseMonitorKey()
|
||||
"Pre-distinct: key=$key"
|
||||
}
|
||||
}
|
||||
.distinctUntilChangedBy { it?.toPlayPauseMonitorKey() }
|
||||
.onEach { device ->
|
||||
log(TAG, VERBOSE) { "Post-distinct: profileId=${device?.profileId}" }
|
||||
@@ -73,7 +67,10 @@ class PlayPause @Inject constructor(
|
||||
match
|
||||
}
|
||||
.onEach { (previous, current) ->
|
||||
log(TAG, VERBOSE) { "Checking\nprevious=$previous\ncurrent=$current" }
|
||||
log(TAG, VERBOSE) {
|
||||
"Checking: prev(left=${previous?.isLeftInEar}, right=${previous?.isRightInEar}, worn=${previous?.isBeingWorn}) " +
|
||||
"-> cur(left=${current?.isLeftInEar}, right=${current?.isRightInEar}, worn=${current?.isBeingWorn})"
|
||||
}
|
||||
|
||||
val reactions = current?.reactions
|
||||
if (reactions == null) {
|
||||
|
||||
Reference in New Issue
Block a user