From 1fce1571046debe5e59b23c93b4df703a0dc0d52 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Wed, 11 Nov 2020 19:24:45 +0100 Subject: [PATCH] logging: prevent full logging of errors for silent logs --- src/components/LogRequestsComponent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LogRequestsComponent.ts b/src/components/LogRequestsComponent.ts index 0e70ae3..b254c0b 100644 --- a/src/components/LogRequestsComponent.ts +++ b/src/components/LogRequestsComponent.ts @@ -52,7 +52,7 @@ export default class LogRequestsComponent extends ApplicationComponent { if (silent) { if (err instanceof HttpError) logStr += ` ${err.errorCode}`; logStr += ` ${err.name}`; - return req.log.info(err, logStr).requestId; + return req.log.info(err.name, logStr).requestId; } else { return req.log.error(err, logStr, additionalStr, err).requestId; }