fix: add executionTime property to logging for interactions

This commit is contained in:
Marius Begby committed 2023-08-28 16:25:22 +02:00
1 parent 1e1170099e
commit a248452f2c
1 file changed
+6 -1
+6 -1
View File
@@ -188,7 +188,12 @@ module.exports = {
const outputTime: number = new Date().getTime();
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) {
logger.warn(`Interaction '${interactionIdentifier}' took ${executionTime} ms to execute.`);