[Python] Changing Loggers on demand

Discussão em 'Python' iniciado por Stack, Abril 5, 2025.

  1. Stack

    Stack Membro Participativo

    Say I got a root logger with a StreamHandler and FileHandler added to it. Any of the child loggers will inherit the root logger. Is there any way I can amend the child logger so for e.g it saves messages in a different format then the one configured for the root logger.

    [<logging.StreamHandler instance at 0x0884B850>, <logging.FileHandler instance at 0x0C7A84E0>

    Continue reading...

Compartilhe esta Página