Project

General

Profile

Anomalie #7850

Impossible de configurer un logger syslog nommé

Added by Bruno Boiget over 7 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Category:
-
Start date:
04/03/2014
Due date:
04/04/2014
% Done:

100%

Spent time:
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

Related to creole - Anomalie #7853: Mise à jour des fonctions de log Zéphir dans creole.fonctionseole Fermé 04/04/2014

Associated revisions

Revision 6765f7e1 (diff)
Added by Daniel Dehennin over 7 years ago

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 7 years ago

  • Start date set to 04/03/2014

#2 Updated by Daniel Dehennin over 7 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 7 years ago

  • Status changed from Accepté to Résolu
  • % Done changed from 0 to 100

#4 Updated by Emmanuel GARETTE over 7 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)

Also available in: Atom PDF