Projet

Général

Profil

Development #8028

Add facility to make loglevel of handlers dynamic

Ajouté par Benjamin Dauvergne il y a plus de 8 ans. Mis à jour il y a plus de 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
-
Version cible:
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

Révision 0bb88003 (diff)
Ajouté par Benjamin Dauvergne il y a plus de 8 ans

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.

Historique

#1

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
#2

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Solution déployée
#3

Mis à jour par Benjamin Dauvergne il y a plus de 6 ans

  • Statut changé de Solution déployée à Fermé

Formats disponibles : Atom PDF