bithavoc / express-winston

express.js middleware for winstonjs
https://www.npmjs.com/package/express-winston
MIT License
797 stars 187 forks source link

req passed to ignoreRoute does not contain proper information #93

Closed thecatontheflat closed 8 years ago

thecatontheflat commented 8 years ago

https://github.com/bithavoc/express-winston/blob/master/index.js#L173

I was trying to ignore logging based on the res.statusCode. But at this moment, the status code is somehow 200, even though in the log message it is 404

natelaws commented 8 years ago

Using the skip option might work better for you as that is called after the request is actually processed.

thecatontheflat commented 8 years ago

Thank you @natelaws, that is what I ended up with. I didn't quite get the difference though

rosston commented 8 years ago

I added a little bit of clarification to the Readme in https://github.com/bithavoc/express-winston/commit/d0a3e99. Closing because there's no real action to take other than the better documentation.