Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
A behavior change in 14324cf is causing common.loggly to potentially call both the
callbackandsuccessfunctions in the event the Loggly servers come back with a error code but later returns a success.Prior to this commit. Only one or the other function would ever be called.
This behavior is breaking both node-loggly-bulk's own Loggly.prototype.log function as well as winston-loggly-bulk's Loggly.prototype.log function which delegates to it since in both cases the callback passed in is only expected to be called once.
I am currently working on a pull request that modifies common.loggly to ensure that the
callbackandsuccessfunctions combined only ever get called once.I recommend changing common.loggy's signature so that it only accepts a single callback function. I do not believe this will cause issues to dependent third-party libraries since it is not exported as part of
require('node-loggly-bulk'). I will create a separate issue for this recommendation for consideration.