villadora / express-bunyan-logger

bunyan logger middleware for express
139 stars 74 forks source link

deprecation errors with nodejs v12 #55

Open bdurrani opened 5 years ago

bdurrani commented 5 years ago

This library will generate deprecation warnings with node v12.

(node:8) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
    at ServerResponse.logging (/app/node_modules/express-bunyan-logger/index.js:130:36)
    at ServerResponse.emit (events.js:201:15)
    at ServerResponse.EventEmitter.emit (domain.js:471:20)

The fix is fairly straightforward. I can create a PR for it if one is required.

oliversalzburg commented 5 years ago

It doesn't look like PRs have been merged in a while :( I'd still love to see one so I can cherry-pick the change into our fork :D

uvios commented 5 years ago

I am getting same warning.

twhitner-vistaprint commented 5 years ago

Any movement on this? Very quick fix to get rid of the ERROR.

twhitner-vistaprint commented 5 years ago

I added a PR to address this. Anyway to get it merged and released?

mrYakamoto commented 4 years ago

Any chance we can get this merged?

oliversalzburg commented 4 years ago

You can try emailing the author, but I doubt anything will happen on GitHub. You can also just fork the project or reimplement the logger in your own code. Good luck :)

chaudhryjunaid commented 3 years ago

I have forked and patched express-bunyan-logger at: https://github.com/chaudhryjunaid/express-bunyan-logger PR: https://github.com/chaudhryjunaid/express-bunyan-logger/pull/1

Kindly install using:

npm i 'git+https://github.com/chaudhryjunaid/express-bunyan-logger.git'

and use like this:

app.use(require('@chaudhryjunaid/express-bunyan-logger')(loggerOptions));
chaudhryjunaid commented 3 years ago

I have published an npm package at: https://www.npmjs.com/package/@chaudhryjunaid/express-bunyan-logger