Open ShakeebAftab opened 1 month ago
My current logger looks something like this
export const expressRequestLogger = logger({ transports: [ new transports.File({ filename: "logs/requests.log", }), ], meta: true, expressFormat: true, bodyBlacklist: ["password"], responseWhitelist: ["body"], statusLevels: true });
I was wondering if there's a way to only allow body to be logged if the status code indicates an error?
My current logger looks something like this
I was wondering if there's a way to only allow body to be logged if the status code indicates an error?