Skip to content

Commit

Permalink
fix error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
chakany committed Feb 15, 2023
1 parent 20bc7b4 commit c6c162c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ export default class Logger {
}

public error(...data) {
console.error(`[${this.name}]`, data);
console.error(`[${this.name}]`, ...data);
}
}
8 changes: 4 additions & 4 deletions src/lib/Nostr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ export default class Nostr {
this._privkey = "";
}

this.relays.onnotice((relayUrl, notice) => {
this._log.info(`NOTICE from ${relayUrl} `, notice)
this.relays.onnotice((url, msg) => {
this._log.info(`NOTICE from ${url} `, msg)
});

this.relays.ondisconnect((url, msg) => {
this._log.warn(`Disconnected from ${url}: `, msg)
})

this.relays.onerror((err, relayUrl) => {
this._log.error(`from ${relayUrl} `, err);
this.relays.onerror((url, msg) => {
this._log.error(`Error with ${url} `, msg);
});
}

Expand Down

0 comments on commit c6c162c

Please sign in to comment.