From d017a6f53e9bf8b14cf8fe7ed4c35af4e908ef67 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Tue, 16 Nov 2021 09:45:58 +0000 Subject: [PATCH] Log to console when running locally As well as using the `/logs` page, having output on the console output can be convenient, too. This only applies to locally executing Arc Sandbox. --- src/shared/logger.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/logger.js b/src/shared/logger.js index f980fba..ad16acb 100644 --- a/src/shared/logger.js +++ b/src/shared/logger.js @@ -14,6 +14,9 @@ async function log (type, message, description) { description, expires } + if (process.env.ARC_ROLE && process.env.ARC_ROLE === 'SandboxRole') { + console.log(JSON.stringify(log)) + } await data.logs.put(log) }