Using loguru in a library
Roy Hann
specially at processed.almost.meat
Tue May 2 18:10:11 EDT 2023
Dieter Maurer wrote:
> 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.
Thank you for the response Dieter.
I am using the loguru package, not the logging package.
I think my next step is going to have be creating a minimal test
case to post on stackoverflow. :-P
Roy
More information about the Python-list
mailing list