namshi / winston-graylog2

Graylog2 transport for winston, a nodejs logging module
MIT License
126 stars 62 forks source link

Deprecation message: graylog2 is a legacy winston transport #65

Closed juwara0 closed 5 years ago

juwara0 commented 6 years ago

Description

The following message is being generated:

console.error node_modules/winston-transport/legacy.js:99
graylog2 is a legacy winston transport. Consider upgrading:
- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md

Looking at that code above: https://github.com/winstonjs/winston-transport/blob/master/legacy.js#L97-L103

Possible Solution

Upgrade the winston dependency. Once the winston dependency is upgraded it looks like the deprecation is possibly related to the transport: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md#transports

https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L63 https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L64 https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L97

Environment Details

This is being seen when using: node v10.8.0 nom 6.2.0 winston@3.1.0 winston-graylog2@1.0.3 └── winston@2.4.4

odino commented 6 years ago

Hi Michael, would you mind sending a PR for this?

On Wed 3 Oct, 2018, 8:44 PM Michael Carroll, notifications@github.com wrote:

Description

The following message is being generated:

console.error node_modules/winston-transport/legacy.js:99 graylog2 is a legacy winston transport. Consider upgrading:

Looking at that code above: https://github.com/winstonjs/winston-transport/blob/master/legacy.js#L97-L103 Possible Solution

Upgrade the winston dependency. Once the winston dependency is upgraded it looks like the deprecation is possibly related to the transport: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md#transports

https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L63

https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L64

https://github.com/namshi/winston-graylog2/blob/master/lib/winston-graylog2.js#L97 Environment Details

This is being seen when using: node v10.8.0 nom 6.2.0 winston@3.1.0 winston-graylog2@1.0.3 └── winston@2.4.4

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/namshi/winston-graylog2/issues/65, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUC5CB63Quo4QC-pe6Tj0CYaqjCgrWBks5uhOlugaJpZM4XGbi4 .

fchristle commented 6 years ago

@odino @juwara0 Is this issue being worked on?

jeremy-j-ackso commented 5 years ago

I'm still getting this error with the new package v1.1.0

node v10.14.1
winston v3.1.0
winston-graylog2 v1.1.0
jeremy-j-ackso commented 5 years ago

Looks like it's because there's a lot of outdated packages.

$ npm outdated
Package                 Current  Wanted  Latest  Location
eslint                   4.19.1  4.19.1  5.11.1  winston-graylog2
eslint-config-google      0.9.1   0.9.1  0.11.0  winston-graylog2
eslint-plugin-prettier    2.7.0   2.7.0   3.0.0  winston-graylog2
husky                    0.14.3  0.14.3   1.2.1  winston-graylog2
lint-staged               7.3.0   7.3.0   8.1.0  winston-graylog2
winston                   2.4.4   2.4.4   3.1.0  winston-graylog2

Lots of possible breaking changes here, but I'm going to give updating a shot in my fork.

odino commented 5 years ago

:+1:

Worst case scenario well release a new major :)

On Thu 27 Dec, 2018, 8:51 PM Jeremy Jackson <notifications@github.com wrote:

Looks like it's because there's a lot of outdated packages.

$ npm outdated Package Current Wanted Latest Location eslint 4.19.1 4.19.1 5.11.1 winston-graylog2 eslint-config-google 0.9.1 0.9.1 0.11.0 winston-graylog2 eslint-plugin-prettier 2.7.0 2.7.0 3.0.0 winston-graylog2 husky 0.14.3 0.14.3 1.2.1 winston-graylog2 lint-staged 7.3.0 7.3.0 8.1.0 winston-graylog2 winston 2.4.4 2.4.4 3.1.0 winston-graylog2

Lots of possible breaking changes here, but I'm going to give updating a shot in my fork.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/namshi/winston-graylog2/issues/65#issuecomment-450189440, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUC5FzPa28qsApbDcSfsE3dedVLyxHDks5u9PqRgaJpZM4XGbi4 .

jeremy-j-ackso commented 5 years ago

Hooboy. Doesn't look like there's a straightforward upgrade path due to updates to Node and winston-transport for preferring ES6 classes, and breaking changes in winston's upgrade to 3.0 guide. Among other things, util.inherits() is discouraged and may be deprecated in a future Node version.

Unfortunately, that might also break it for Node <8.0.0.

Would either have to do a new major version with guidelines on using a prior version of this package for Node <8.0.0 or do a fork as a new package that focuses on compatibility with winston 3.

Is there an option that I missed? What are your thoughts?

odino commented 5 years ago

I'm not against a new major, end of the day if you're on older node version you can deal with an older version of this package

On Thu 27 Dec, 2018, 9:51 PM Jeremy Jackson <notifications@github.com wrote:

Hooboy. Doesn't look like there's a straightforward upgrade path due to updates to Node and winston-transport for preferring ES6 classes, and breaking changes in winston's upgrade to 3.0 guide https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md. Among other things, util.inherits() is discouraged and may be deprecated in a future Node version https://nodejs.org/dist/latest-v10.x/docs/api/util.html#util_util_inherits_constructor_superconstructor .

Unfortunately, that might also break it for Node <8.0.0.

Would either have to do a new major version with guidelines on using a prior version of this package for Node <8.0.0 or do a fork as a new package that focuses on compatibility with winston 3.

Is there an option that I missed? What are your thoughts?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/namshi/winston-graylog2/issues/65#issuecomment-450199771, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUC5GdoMBrgPR-rwn2Tku5qShzSlmEAks5u9QiIgaJpZM4XGbi4 .

jeremy-j-ackso commented 5 years ago

I've updated my fork with modifications, would appreciate feedback if you have time to give any. https://github.com/jeremy-j-ackso/winston-graylog2

Before I submit a PR I'm going to first test it with a sample project to make sure it actually logs, and then I'll also update the README.

jeremy-j-ackso commented 5 years ago

Here's my working example: https://github.com/jeremy-j-ackso/wgl-example

Going to finish updating the README, and then I'll PR.