diff --git a/lib/logger.js b/lib/logger.js index 2232b1d..611bace 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -68,6 +68,18 @@ const Logger = ({ throw e; } } + async notify(...args) { + try { + return await super.notify(...args); + } catch (e) { + this.log( + 'error', + 'Notify', + e?.error?.stack || e?.stack || e, + args + ); + } + } async init() { this.log('debug', 'Logger', 'Init'); return super.init && (await super.init()); diff --git a/lib/wss.js b/lib/wss.js index 9f790fe..12431a6 100644 --- a/lib/wss.js +++ b/lib/wss.js @@ -53,7 +53,8 @@ const Wss = ({ ); this.log( 'info', - `Connections count:${this.connections.size}(by time): `, + `Connections count:${this.connections.size}: `, + [...this.connections.keys()], [...this.connections.values()].map(({time}) => time) ); }, 10000);