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

CSSUTILS logger overrides existing config on import #13

Open
strokirk opened this issue Jul 14, 2021 · 1 comment
Open

CSSUTILS logger overrides existing config on import #13

strokirk opened this issue Jul 14, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@strokirk
Copy link

Hi!

On first import of cssutils, the 'CSSUTILS' logger is set up and configured with some default values, as can be seen here:
https://github.com/jaraco/cssutils/blob/main/cssutils/errorhandler.py#L51-L56

This can lead to issues if your import of cssutils happens later than your main logging config setup, since it will override whatever is already configured. To avoid it, you must pre-emptively import cssutils before your own logging config.

It would be easier if cssutils detected if the logger has already been set up, and didn't add it's own default config in that case. At the very least, if it preserved the loglevel the user has selected that would help.

@jaraco
Copy link
Owner

jaraco commented Jun 3, 2022

Sounds reasonable to me. Can you draft a fix?

@jaraco jaraco added enhancement New feature or request help wanted Extra attention is needed labels Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants