Clean logs from unwanted info and use \t as a delimiter to align

Closes #6
This commit is contained in:
Alice Gaudon 2021-01-22 16:07:17 +01:00
parent 94cb157520
commit 1c71f66150

View File

@ -9,6 +9,15 @@ export const logger = new TsLogger({
requestId: (): string => { requestId: (): string => {
return requestIdStorage.getStore() as 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) => { export const loggingContextMiddleware: RequestHandler = (req, res, next) => {