Logging re-initialized in make_app()
Mads Kiilerich
mads at kiilerich.com
Wed Dec 4 01:10:48 UTC 2019
On 12/4/19 1:36 AM, Wolfgang Scherer wrote:
> When following the instructions for WSGI dispatch at https://kallithea.readthedocs.io/en/latest/setup.html#apache-with-mod-wsgi any attempt to pass defaults to the logging initialization fails later, when logging is initialized again in :func:`make_app` of |kallithea/config/middleware.py|.
>
> See http://sw-amt.ws/kallithea-deploy/html/overview.html#bug-logging-re-initialized-in-make-app for a full description of the bug.
>
> Attached is a patch, that works for me.
Thanks for the report and patch!
It seems like some different strategies could be:
1. don't initialize logging in the WSGI script - just rely on what is
happening in make_app.
2. don't initialize logging in make_app - make sure it is initialized in
all code paths that end up in make_app ... such as WSGI script and
kallithea-cli.
Do you have any experience with these alternative approaches ... or
thoughts about why they might be good or bad?
/Mads
More information about the kallithea-general
mailing list