bithavoc / express-winston

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

Why doesn't the default error handler print in test environment? #186

Closed acham1 closed 6 years ago

acham1 commented 6 years ago

i.e. what's the reason behind this conditional?

https://github.com/expressjs/express/blob/c0136d8b48dd3526c58b2ad8666fb4b12b55116c/lib/application.js#L628

function logerror(err) {
  /* istanbul ignore next */
  if (this.get('env') !== 'test') console.error(err.stack || err.toString());
}

Thanks!

rosston commented 6 years ago

@acham1 That code is in express, which is maintained by a separate group. So we will not be able to answer your question here. I'm going to close this since the original question was about an unrelated package, but if you have an issue with express-winston specifically, feel free to respond here.