Skip to content

CSSUTILS logger overrides existing config on import #13

@strokirk

Description

@strokirk

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions