Development #8028
Add facility to make loglevel of handlers dynamic
Début:
06 août 2015
Echéance:
% réalisé:
100%
Temps estimé:
Patch proposed:
Non
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.
Révisions associées
Historique
Mis à jour par Benjamin Dauvergne il y a plus de 8 ans
- Statut changé de Nouveau à Résolu (à déployer)
- % réalisé changé de 0 à 100
Appliqué par commit authentic2|0bb88003fb68f7d9f990bc4c79823b2af5167b27.
Mis à jour par Benjamin Dauvergne il y a environ 8 ans
- Statut changé de Résolu (à déployer) à Solution déployée
Mis à jour par Benjamin Dauvergne il y a plus de 6 ans
- Statut changé de Solution déployée à Fermé
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.