-
Notifications
You must be signed in to change notification settings - Fork 45
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
Simplify log_level()
#182
base: main
Are you sure you want to change the base?
Simplify log_level()
#182
Conversation
Previously created a function then immediately called it. Now it just inlines the results of that function, which leads to a bunch of simplification. Waiting for daroczig#170 since otherwise `catch_base_log()` ends up setting `appender()` to something other than a function. After this can probably deprecate `logger()` since I don't think there's much use for it outside the package anyway.
…intent with comments
Sorry, I just got to this PR. You are absolutely right that the return value is not documented 😞 Let me think about this one, but I'm very open to any related thoughts. |
IMO the additional complexity needed to support that feature is not worth it, especially due to the difficulty (as mentioned in that thread) of exactly what the object should be if there are multiple loggers on the stack. If you really want to keep it, I'm happy to update my code to do so, but my sense would be that it's not going to affect much code in practice, and the simplification will make it easier to apply performance improvements down the road. |
Previously created a function then immediately called it. Now it just inlines the results of that function, which leads to a bunch of simplification. I think this changes suggests that we could deprecate
logger()
since I doubt there's much use for it outside the package.This is technically a breaking change since it alters the return value of
log_level()
and friends. But the current return value was not documented, and it seems unlikely that folks would be dependent on the specific value. Still needs a NEWS bullet though.