Project

General

Profile

Revision 5424b999

ID5424b9998ccd1e8c91d9f81f0f2f8d350839ef0a
Parent ffa36417
Child 48acee1e

Added by Francois POIROTTE over 13 years ago

Modification de la couche middleware de l'auth pour utiliser le logger "auth" défini dans le fichier de conf INI.
Suppression du support des directives log_file et log_level (les loggers standards de Python sont plus flexibles).

git-svn-id: https://vigilo-dev.si.c-s.fr/svn@5541 b22e2e97-25c9-44ff-b637-2e5ceca36478

View differences:

deployment/settings.ini
76 76
; de l'authentification.
77 77
auth.config = %(here)s/who.ini
78 78

  
79
; Priorité des événements de journalisation émis.
80
; Valeurs possibles : debug, info, notice, warning, error, critical.
81
;auth.log_level = debug
82

  
83 79
;
84 80
; 3 - Configuration de l'interface.
85 81
;
vigiboard/config/middleware.py
28 28
from paste.urlparser import StaticURLParser
29 29
from repoze.who.plugins.testutil import make_middleware_with_config \
30 30
                                    as make_who_with_config
31
from logging import getLogger
31 32

  
32 33
__all__ = ['make_app']
33 34

  
......
71 72
    app = make_who_with_config(
72 73
        app, global_conf,
73 74
        app_conf.get('auth.config', 'who.ini'),
74
        app_conf.get('auth.log_file', None),
75
        app_conf.get('auth.log_level', 'debug'),
75
        None,
76
        None,
76 77
        app_conf.get('skip_authentication')
77 78
    )
79
    # On force l'utilisation d'un logger nommé "auth"
80
    # pour la compatibilité avec TurboGears.
81
    app.logger = getLogger('auth')
78 82
    return app

Also available in: Unified diff