Skip to content

use logger with NullHandler by default #146

Closed
@vladak

Description

@vladak

There is a lot blocks in MQTT that go like this:

    if self.logger is not None:
        self.logger.debug("Setting last will properties")

The check for the logger makes the code more difficult to read. Setting a logger with NullHandler by default and replacing the handler with StreamHandler in enable_logger() would avoid these contructs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions