Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Winston 3.0? #74

Open
SAGV opened this issue Nov 1, 2017 · 7 comments
Open

Support for Winston 3.0? #74

SAGV opened this issue Nov 1, 2017 · 7 comments

Comments

@SAGV
Copy link

SAGV commented Nov 1, 2017

Winston 3.0 is going to be released soon. It has some breaking changes for transports which makes winston-papertrail incompatible.

For example, log is now called with a single info object containing message, level instead of a few separate variables.

@kenperkins or @troy would you be so kind to adjust the plugin for the new winston version?

@ssrballin
Copy link

ssrballin commented May 11, 2018

Does anyone have any info on whether this project will be updated, or if there are any alternatives to support the winston/v3.0-papertrail integration? If not, I might start working on an updated integration to support this. Thought I'd ask around first.

@kenperkins @troy @SAGV @dmiddlecamp

@dmiddlecamp
Copy link
Contributor

Do you think it'd be better to embrace the breaking changes and go full Winston 3.0? Or does anyone have a sense of if folks are also using the old version as well? Should there be an effort to allow backwards compatibility?

@ssrballin
Copy link

I think backward compatibility is always a good thing, but I think that could be handled by versioning in npm with a note in the docs regarding which winston-papertrail version supports which winston version.

@etiennea
Copy link

Winston 3.0 has gone to production so if you do npm install winston winston-papertrail it will crash you need to do winston@2.x.x, would be good to get it to work.

@markdascher
Copy link
Collaborator

I actually haven't seen any crashing with winston 3.0 in my own tests. The usage example works with just one change: replace new winston.Logger with winston.createLogger. This nice compatibility layer takes care of the rest: winstonjs/winston-transport. There is a warning message emitted, but otherwise it works fine:

Papertrail is a legacy winston transport. Consider upgrading: 
- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md

Only wrinkle is that JSON is being appended to each message (on a second line), but I've opened winstonjs/winston-transport#27 about that.

Am I overlooking something? As long as it still works, I'd probably favor either leaving this transport as-is or performing a complete overhaul as described in UPGRADE-3.0.md. Something more targeted (e.g. #78) would just seem to break backward compatibility without actually getting the benefits of winston 3.0.

@KFrysztak
Copy link

@markdascher Hi Mark, any news about winstonjs/winston-transport#27 ?

@BeauBouchard
Copy link

BeauBouchard commented Aug 30, 2018

Hello, I am interested in an update on this Issue as well, 👍

Let me know if there is any additional support you require.

I also noticed this support works for my needs.
#78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants