diff --git a/lib/logger.js b/lib/logger.js index 611bace..48299a1 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -42,15 +42,15 @@ const Logger = ({ } add(arg) { const {name, fn} = arg; - this.log('debug', 'Add', name); + this.log('debug', 'Logger', 'Add', name); super.add(arg); } remove(data) { - this.log('debug', 'Remove', data.name); + this.log('debug', 'Logger', 'Remove', data.name); super.remove(data); } async send(data) { - this.log('debug', 'Send', { + this.log('debug', 'Logger', 'Send', { id: data.id, method: data.method, caller: data?.meta?.caller, @@ -74,6 +74,7 @@ const Logger = ({ } catch (e) { this.log( 'error', + 'Logger', 'Notify', e?.error?.stack || e?.stack || e, args diff --git a/lib/wss.js b/lib/wss.js index e8d81af..0a2fb03 100644 --- a/lib/wss.js +++ b/lib/wss.js @@ -170,7 +170,7 @@ const Wss = ({ }) { // maybe reject all requests made on this connection wsClient.on('close', async() => { - this.remove(connectionId + '.write'); + this.remove({name: connectionId + '.write'}); const conn = this.connections.get(connectionId); try { await this.notify({