-
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
Import glue #198
base: main
Are you sure you want to change the base?
Import glue #198
Conversation
I'm not sure I got all the docs, but hopefully I got most of them.
@hadley @daroczig Gergo and Hadley, with all respect (esp. regarding the impressive series of your recent PRs, Hadley), could we keep logger a dependency-free package? Pros (current implementation):
Cons:
If one really wants to help those users who are affected by Cons 1) , it is easy to create logger.glue which imports glue and logger. As for Cons 3), the overhead could be avoided by refactoring these checks. I am happy to create a PR if this is really needed, but I think the overhead is negligible to the total runtime of any |
@tdeenes for content, this PR is a consequence of a live discssuion with @daroczig. My primary concern with the current behaviour is that it will silently behave differently depending on whether or not glue is installed, and IMO that's a major drawback in a logging package which you would hope to behave identically in every possible scenario. Additionally, glue is itself a 0-dependency package (and always will be) so this is an extremely lightweight dependency. And this is not a slippery slope — logger can take 1 dependency without any plans to take more in the future. |
Yup, I understand this concern - even more so, I agree with it - but I still would let the users of the package decide what they want via env vars and options. So basically extend the already existing I can create a PR tomorrow if there is interest. |
Thank you both! Originally, I wanted to keep Folks preferring the old behavior can pin Regarding the env vars: that's generally a good idea, but we should try to avoid using I could imaging an env var to support the old behavior (using |
As for env vars: I have been thinking of a deliberately limited use case exactly for the reason that you mentioned. So only formatters, layout, and appender functions which are exported by the package would be supported. Something along the lines of:
|
For backward compatibility we can keep the current logic and set the default for |
I'm not sure I got all the docs, but hopefully I got most of them.