Skip to content

logging should be given a NullHandler #177

@sterns1

Description

@sterns1

Hi,

I am getting DEBUG logging statements from this library by way of the requests library. To keep chardet logging messages from showing up in my logging output, I have to explicitly setLevel(logging.WARNING) for the chardet logger.

Would it be reasonable to add a NullHandler to your logger with the level of Logging.INFO? WARNING should still be displayed as described at https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library . Or is this not a problem, and the responsibility to silence all imported modules' logging on the person importing the library?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions