Development #8028
Add facility to make loglevel of handlers dynamic
Start date:
06 August 2015
Due date:
% Done:
100%
Estimated time:
Patch proposed:
No
Planning:
Description
Adapted from our hobo library, this patch adds a new handler which can detect some subclass of the int
which indicate to retrieve the log level from some setting of the Django settings module.
Associated revisions
History
Updated by Benjamin Dauvergne over 7 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit authentic2|0bb88003fb68f7d9f990bc4c79823b2af5167b27.
Updated by Benjamin Dauvergne almost 7 years ago
- Status changed from Résolu (à déployer) to Solution déployée
use a special logger to make DEBUG log activation dynamic (fixes #8028)
Adds a new logger called DjangoLogger which check if the level is a
SettingsLogLevel object, in this case it checks a Django setting to
known if it should return DEBUG intead of the default log level.
The authentic2.logger module must be imported before using the logging
module so that all created logger use our new class. To achieve that
import is done in authentic2-ctl and wsgi.py which are the entrypoints
for authentic2.