From b96c996a45b0a47b4ee98e7731d2c78b9d3ab514 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 9 Sep 2021 08:46:09 +1000 Subject: [PATCH] Log more info for internal errors in debug mode --- backend/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app.js b/backend/app.js index 33ffacc5..8f4890c3 100644 --- a/backend/app.js +++ b/backend/app.js @@ -75,7 +75,7 @@ app.use(function (err, req, res, next) { // Not every error is worth logging - but this is good for now until it gets annoying. if (typeof err.stack !== 'undefined' && err.stack) { - if (process.env.NODE_ENV === 'development') { + if (process.env.NODE_ENV === 'development' || process.env.DEBUG) { log.debug(err.stack); } else if (typeof err.public == 'undefined' || !err.public) { log.warn(err.message);