From 8a6ed70e489d815fc6b0e8673f013c45f414dc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Arturo=20Cabral=20Mej=C3=ADa?= Date: Sun, 29 Jan 2023 01:44:07 -0500 Subject: [PATCH] chore: improve mirror logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo Arturo Cabral Mejía --- src/app/static-mirroring-worker.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/static-mirroring-worker.ts b/src/app/static-mirroring-worker.ts index 1a2993a..5d3897c 100644 --- a/src/app/static-mirroring-worker.ts +++ b/src/app/static-mirroring-worker.ts @@ -59,7 +59,7 @@ export class StaticMirroringWorker implements IRunnable { .on('message', async function (raw: RawData) { try { const message = JSON.parse(raw.toString('utf8')) as OutgoingEventMessage - debug('received: %o', message) + debug('received from %s: %o', config.address, message) if (!Array.isArray(message)) { return @@ -118,10 +118,8 @@ export class StaticMirroringWorker implements IRunnable { return } - debug('received broadcast: %o', message.event) - const eventToRelay = createRelayedEventMessage(message.event as any, this.config.secret) - debug('relaying: %o', eventToRelay) + debug('relaying from %s to %s: %o', message.source, this.config.address, eventToRelay) this.client.send(JSON.stringify(eventToRelay)) }