Using loguru in a library

Dieter Maurer dieter at handshake.de
Tue May 2 12:26:16 EDT 2023


Roy Hann wrote at 2023-4-30 15:40 -0000:
>Is there anyone using loguru (loguru 0.5.3 in my case) successfully in a
>library?
> ...
>  import mylib
>  logger.enable('mylib')
>
>expecting that it would report any log messages above level DEBUG, just
>as it does when I don't disable logging.

Have you configured the logging system?

Note that `logging.config.fileConfig` may do strange things
regarding disabling (due to its default parameter
`disable_existing_loggers=True`).
I had several cases of missing log entries because `fileConfig`
had disabled already existing loggers.


More information about the Python-list mailing list