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

[Bug]: Winston 3.0 callback retirement breaks backward compatibility #2095

Open
losalex opened this issue Mar 23, 2022 · 2 comments
Open

[Bug]: Winston 3.0 callback retirement breaks backward compatibility #2095

losalex opened this issue Mar 23, 2022 · 2 comments

Comments

@losalex
Copy link

losalex commented Mar 23, 2022

🔎 Search Terms

callback

The problem

As mentioned in v3.0 upgrade notes, the callback support was removed since "the vast majority of use cases for this feature was folks awaiting all logging to complete". We have a problem with this approach as stated in 502 since googleapis/nodejs-logging-winston uses async APIs to send logging records to the cloud which is preferable way to send logs in order to avoid cloud services delays/disruptions and which used callbacks as an approach to track logging completion.
I believe that there should be a level of backward compatibility maintained for such functionality so the users can adopt a change or even have an option to choose desired functionality based on user's services architecture (correct me if I wrong, but callback is still a valid node paradigm).

What version of Winston presents the issue?

v3.0.0

What version of Node are you using?

v14.17.6

If this worked in a previous version of Winston, which was it?

v2.x

Minimum Working Example

No response

Additional information

No response

@m-salman-afzal
Copy link

Any progress on this? How can this be solved?

@wbt
Copy link
Contributor

wbt commented Nov 8, 2023

My understanding is that promises are preferred over callbacks these days.
However, it does seem like it'd be potentially useful to have promisified versions of the logging functions that return [ignorable] promises resolving when the logging action has completed.

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

No branches or pull requests

3 participants