Anomalie #7850
Impossible de configurer un logger syslog nommé
Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Target version:
Distribution:
EOLE 2.4
Description
>>> from pyeole.log import init_logging >>> logger = init_logging(name='zephir', level=u'error', syslog=True) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/dist-packages/pyeole/log.py", line 314, in init_logging logging.config.dictConfig(log_config) File "/usr/lib/python2.7/logging/config.py", line 777, in dictConfig dictConfigClass(config).configure() File "/usr/lib/python2.7/logging/config.py", line 575, in configure '%r: %s' % (name, e)) ValueError: Unable to configure handler u'syslog': Unable to set formatter u'zephir: %(name)s - %(message)s': u'zephir: %(name)s - %(message)s'
Related issues
Associated revisions
Impossible de configurer un logger syslog nommé
- pyeole/log.py: Ajout d’un « formatter » « syslog-named » afin d’utiliser
le nom comme tag syslog.
(init_logging): Utilisation du « formatter » « syslog-named » lorsque
l’utilisateur fourni un nom.
Fixes: #7850 @30m
History
#1 Updated by Daniel Dehennin over 9 years ago
- Start date set to 04/03/2014
#2 Updated by Daniel Dehennin over 9 years ago
- Subject changed from Erreur si on utilise pyeole.log.init_logging avec syslog=True et le paramètre name to Impossible de configurer un logger syslog nommé
#3 Updated by Daniel Dehennin over 9 years ago
- Status changed from Accepté to Résolu
- % Done changed from 0 to 100
Appliqué par commit 6765f7e142ea25b98b0f04f1eb5ff4fae02c95e6.
#4 Updated by Emmanuel GARETTE over 9 years ago
- Status changed from Résolu to Fermé
L'exemple donné fonctionne :
>>> from pyeole.log import init_logging >>> logger = init_logging(name='zephir', level=u'error', syslog=True)