bithavoc / express-winston

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

Why an empty callback is sent to winston.log? #46

Closed rictorres closed 9 years ago

rictorres commented 9 years ago

I just want to have a better understanding of this:

// This is fire and forget, we don't want logging to hold up the request so don't wait for the callback
options.winstonInstance.log('error', 'middlewareError', exceptionMeta, function () {
    // Nothing to do here
});
floatingLomas commented 9 years ago

It looks like it was added in late 2012; I don't actually think this is necessary, and since Winston would just skip calling the callback if it is not provided, it's probably introducing some unnecessary overhead.

rictorres commented 9 years ago

shall we get rid of it then? i already did it locally, gonna send a pr soon :)