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
question(log): remove setup()
and destroy()
from BaseHandler
?
#4391
Comments
+1 |
-1 to this. Doesn't sound like appropriate reasons for doing breaking changes.
We shouldn't do breaking changes based on just preferences/tastes. Breaking changes like these breaks the trust to the standard library in my view. |
It is not only about taste, web APIs give some guidance for naming methods and properties. We should orient ourselves towards that. For example But in this particular case |
To be clear, I'm +1 for removing Renaming them to |
This seems suggesting removing all of |
I'm only fully in favour of removing the |
Line 25 in 660e78e
|
Then I think we should also remove |
Is your feature request related to a problem? Please describe.
BaseHandler.setup()
andBaseHandler.destroy()
seem kinda odd as methods forBaseHandler
, especially their names.They do not have a purpose in the
BaseHandler
itself, exceptdestroy()
being called on[Symbol.dispose]
.Describe the solution you'd like
I think
BaseHandler
should removesetup()
anddestroy()
,FileHandler
should have methods calledopen()
andclose()
instead ofsetup()
anddestroy()
as that describes better what is happening inside the method.[Symbol.dispose]
should be implemented inFileHandler
to callclose()
.RotatingFileHandler
would inherit fromFileHandler
as it does now and could be overridden as needed.Describe alternatives you've considered
Leave as is.
The text was updated successfully, but these errors were encountered: