Skip to content

Commit

Permalink
chore: improve mirror logging
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
  • Loading branch information
cameri committed Feb 2, 2023
1 parent cd4c60a commit 8a6ed70
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/app/static-mirroring-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
}

Expand Down

0 comments on commit 8a6ed70

Please sign in to comment.