From b4451a4d7ad7682bb49be3a751a34dba4b53c371 Mon Sep 17 00:00:00 2001 From: Ladd Date: Wed, 1 Jan 2025 22:31:07 -0600 Subject: [PATCH] reduce logging --- src/last-write-wins.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/last-write-wins.ts b/src/last-write-wins.ts index fd86026..0652575 100644 --- a/src/last-write-wins.ts +++ b/src/last-write-wins.ts @@ -1,9 +1,9 @@ -import Debug from 'debug'; +// import Debug from 'debug'; import {EntityProperties} from "./entity.js"; import {CollapsedDelta, Lossless, LosslessViewOne} from "./lossless.js"; import {Lossy, valueFromCollapsedDelta} from './lossy.js'; import {DomainEntityID, PropertyID, PropertyTypes, Timestamp, ViewMany} from "./types.js"; -const debug = Debug('rz:lossy:last-write-wins'); +// const debug = Debug('rz:lossy:last-write-wins'); type TimestampedProperty = { value: PropertyTypes, @@ -65,9 +65,7 @@ function reducer(acc: Accumulator, cur: LosslessViewOne): Accumulator { } for (const [key, deltas] of Object.entries(cur.propertyDeltas)) { - debug(`reducer: looking for value for key ${key}`); const {value, timeUpdated} = lastValueFromDeltas(key, deltas) || {}; - debug(`reducer: key ${key} value ${value} timeUpdated ${timeUpdated}`); if (!value || !timeUpdated) continue; if (timeUpdated > (acc[cur.id].properties[key]?.timeUpdated || 0)) {