Skip to content

allow multiple handlers #43

Closed
Closed
@vladak

Description

@vladak

The code says only one handler is supported:

def addHandler(self, hdlr: Handler) -> None:
"""Sets the handler of this logger to the specified handler.
*NOTE* This is slightly different from the CPython equivalent
which adds the handler rather than replacing it.
:param Handler hdlr: The handler to add
"""
self._handler = hdlr
however does not say why.

Is this some hidden limitation or conscious implementation choice ?

I am asking because I'd like to implement a MQTTHandler (log by publishing MQTT messages) and use it in addition to the StreamHandler for my project (vladak/shield#3).

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