From b69445264d55b1cd6d532a7248829a93a33e0131 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Wed, 30 Mar 2022 14:26:51 +0100 Subject: [PATCH] Add additional logging to automations --- packages/server/src/automations/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/src/automations/utils.js b/packages/server/src/automations/utils.js index 64007f28b4..425ccec9de 100644 --- a/packages/server/src/automations/utils.js +++ b/packages/server/src/automations/utils.js @@ -17,10 +17,14 @@ const Runner = new Thread(ThreadType.AUTOMATION) exports.processEvent = async job => { try { // need to actually await these so that an error can be captured properly + console.log( + `${job.data.automation.appId} automation ${job.data.automation._id} running` + ) return await Runner.run(job) } catch (err) { + const errJson = JSON.stringify(err) console.error( - `${job.data.automation.appId} automation ${job.data.automation._id} was unable to run - ${err}` + `${job.data.automation.appId} automation ${job.data.automation._id} was unable to run - ${errJson}` ) console.trace(err) return { err }