winstonjs/winston-loggly

Winston 3.0.0 results in error

Opened this issue · 15 comments

In trying to use winston 3.0.0 the following error was received: { clone } was removed in winston@3.0.0. It looks like this is used on line 102 of winston-loggly.js and causes an error. Any way to work around this?

DABH commented

You can see the definition for the clone function here: https://github.com/winstonjs/winston/blob/2.x/lib/winston/common.js . It's just a util function to clone an object. You could either copy a function like this to winston-loggly, or use one of a number of other packages out there for cloning an object. Could even consider an ES6-style clone like Object.assign({}. meta);.

We'd welcome a PR for this if you'd care to investigate!

I'm afraid that I don't have time to work on it myself, but it seemed odd to me that the clone function was removed (though it appears not all the way), but it is still referenced in other parts of the codebase.

DABH commented

We're focused on pushing a final release of winston@3 out the door at the moment, but once that is done I imagine we will go through all the custom transports like these and try to clean them up and make them all 3.0-compatible. It's indeed an issue that transports like this one are only 2.x-compatible at the moment.

DABH commented

(Incidentally clone feels like a "core javascript" kind of function, so it's better design if that functionality isn't defined somewhere in a logging library -- but of course it's a useful function for various scenarios, like here...)

Any update here? When is compatibility to winston 3 planned? If you already have a rough idea of what needs to be done and it is'nt too much work I could provide a PR.

PR would be welcome.

EDIT: more context the winston team is more focused on any critical path bugs following the 3.0.0 release. Updating transports to latest will come after that. Help from the community is a major boon to the ecosystem <3

Well, there's a lot of open PRs already ^^

Seems a little weird that the custom transports aren't really ready for winston@3. Such bugs shouldn't occur for stable software which seems to be maintained by the same developers! Why did this go through QA?

Same problem here

DABH commented

Let's discuss on #61 -- interested parties welcome to chime in there...

@DABH #61 makes me confused, it's hard to follow a big one like that, opening for years.

Is it issue fixed somewhere?

I am hitting this bug.

Still broken

Error: { clone } was removed in winston@3.0.0.

DABH commented

@jakubmz At the time, I think there was some discussion around winston-loggly-bulk vs. winston-loggly (#61 (comment)). Open to opinions on which package should be preferred going forwards, and/or if there are meaningful differences between the two