Closed muditjuneja closed 7 years ago
I just tested error logging in the same sort of scenario you have shown here, and it worked fine. Perhaps you can put together an example repository with minimal code that shows the problem? Otherwise, I'll mostly just be guessing at what's wrong.
Closing due to inactivity.
I an using routes like app.get("/api/product", productController.get);
I am able to use the Request logging by using app.use(expressWinston.logger({ transports: [ new (winston.transports.File)({ filename: 'Requests.log' }) ] }));
But I am unable to log errors like app.use(expressWinston.errorLogger({ transports: [ new (winston.transports.File)({ filename: 'Errors.log' }) ] }));
Can anyone help me?