Skip to content

Commit

Permalink
fix: more debug, capture notify
Browse files Browse the repository at this point in the history
  • Loading branch information
Elin Angelow committed Apr 29, 2024
1 parent 51d55de commit dd81dd3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
3 changes: 2 additions & 1 deletion lib/wss.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit dd81dd3

Please sign in to comment.