src/log.py: Support for Python 3 logging module.

This commit is contained in:
Valentin Lorentz 2012-08-04 15:04:43 +02:00
parent fa8950b4a4
commit b338c54592

View File

@ -65,6 +65,8 @@ class Formatter(logging.Formatter):
def format(self, record): def format(self, record):
self._fmt = self._fmtConf() self._fmt = self._fmtConf()
if hasattr(self, '_style'): # Python 3
self._style._fmt = self._fmtConf()
return logging.Formatter.format(self, record) return logging.Formatter.format(self, record)