Conversation

greezybacon

CPython allows specifying a list of handlers in the initialization of logging with basicConfig(handlers=). This adds similar support but only with a single handler. It allows to initialize logging with a single, specialized handler.

CPython allows specifying a list of handlers in the initialization of
logging with basicConfig(handlers=<iterable>). This adds similar support
but only with a single handler. It allows to initialize logging with a
single, specialized handler.

Signed-off-by: Jared Hancock <[email protected]>
@stinos

It seems like a small step to just support handlers then, such that the code should remains compatible with CPython?

@greezybacon

I could do that, yeah. My thought was that for an MCU more than one handler is unlikely, but I agree that compatibility means that everyone feels more comfortable using Micropython.

@Josverl

I agree that handlers = [] is simpler to learn ,
it also means that adding
Logger.addHandler() makes more sense.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.