You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using express-routes-mapper for routes and I have expressWinston.logger({}) before app.use('abc/xyz', mappedOpenRoutes); and expressWinston.errorLogger({}) after app.use('abc/xyz', mappedOpenRoutes); but expressWinston.logger({}) showing in console but errorLogger is not showing error into file.
I have error like ReferenceError: email is not defined but that is not being logged.
It posts the Errors console, but does not use JSON. So it is always only posting to console.
app.use(// This is not posting as JSON in productionexpressWinston.errorLogger({transports: [newwinston.transports.Console()],format: winston.format.combine(winston.format.json()),}))
I am using express-routes-mapper for routes and I have
expressWinston.logger({})
beforeapp.use('abc/xyz', mappedOpenRoutes);
andexpressWinston.errorLogger({})
afterapp.use('abc/xyz', mappedOpenRoutes);
butexpressWinston.logger({})
showing in console but errorLogger is not showing error into file.I have error like
ReferenceError: email is not defined
but that is not being logged.app.use( expressWinston.errorLogger({ transports: [ new winston.transports.Console(), new DailyRotateFile({ filename: '%DATE%-error.log', datePattern: 'DD-MM-YYYY', maxSize: '20480', zippedArchive: true, }), ], format: winston.format.combine( winston.format.colorize(), winston.format.json() ), msg: '{{err.message}}', }) );
The text was updated successfully, but these errors were encountered: