mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-04 14:38:49 +00:00
fix: add executionTime property to logging for interactions
This commit is contained in:
1 parent
1e1170099e
commit
a248452f2c
1 file changed
+6
-1
@@ -188,7 +188,12 @@ module.exports = {
|
|||||||
const outputTime: number = new Date().getTime();
|
const outputTime: number = new Date().getTime();
|
||||||
const executionTime: number = outputTime - inputTime;
|
const executionTime: number = outputTime - inputTime;
|
||||||
|
|
||||||
logger.info(`Interaction '${interactionIdentifier}' handled in ${executionTime} ms.`);
|
logger.info(
|
||||||
|
{
|
||||||
|
executionTime: executionTime
|
||||||
|
},
|
||||||
|
`Interaction '${interactionIdentifier}' successfully handled in ${executionTime} ms.`
|
||||||
|
);
|
||||||
|
|
||||||
if (executionTime > 10000) {
|
if (executionTime > 10000) {
|
||||||
logger.warn(`Interaction '${interactionIdentifier}' took ${executionTime} ms to execute.`);
|
logger.warn(`Interaction '${interactionIdentifier}' took ${executionTime} ms to execute.`);
|
||||||
|
|||||||
Reference in new issue
Block a user