From 1c71f66150ea9c402b47d5b7d908aaf5c13a3b25 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Fri, 22 Jan 2021 16:07:17 +0100 Subject: [PATCH] Clean logs from unwanted info and use \t as a delimiter to align Closes #6 --- src/Logger.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Logger.ts b/src/Logger.ts index ecb5dfa..f970913 100644 --- a/src/Logger.ts +++ b/src/Logger.ts @@ -9,6 +9,15 @@ export const logger = new TsLogger({ requestId: (): string => { return requestIdStorage.getStore() as string; }, + delimiter: '\t', + maskValuesOfKeys: [ + 'Authorization', + 'password', + 'password_confirmation', + 'secret', + ], + displayFunctionName: false, + displayFilePath: 'hidden', }); export const loggingContextMiddleware: RequestHandler = (req, res, next) => {