[New-bugs-announce] [issue17508] logging.config.ConvertingDict issue with MemoryHandler

Pierre Le Marre report at bugs.python.org
Thu Mar 21 13:34:27 CET 2013


New submission from Pierre Le Marre:

Hi, I use Python 3.2.3 and Python 3.3.0 on Windows 7 64 bits.
I have an issue with the short script enclosed.
I use the module logging to get a log file with logging.FileHandler. There were some issues about the file access on Windows, so I added a buffer with logging.handlers.MemoryHandler. I configure the logging using logging.config.dictConfig.
The issue appears when it comes to flush the MemoryHandler, either by reaching the capacity or by calling logging.shutdown(). Please find hereinbelow the traceback:

Traceback (most recent call last):
  File "C:\temp\bug-logging.py", line 38, in <module>
    logger.info(n)
  File "C:\Python32\lib\logging\__init__.py", line 1232, in info
    self._log(INFO, msg, args, **kwargs)
  File "C:\Python32\lib\logging\__init__.py", line 1364, in _log
    self.handle(record)
  File "C:\Python32\lib\logging\__init__.py", line 1374, in handle
    self.callHandlers(record)
  File "C:\Python32\lib\logging\__init__.py", line 1436, in callHandlers
    hdlr.handle(record)
  File "C:\Python32\lib\logging\__init__.py", line 835, in handle
    self.emit(record)
  File "C:\Python32\lib\logging\handlers.py", line 1090, in emit
    self.flush()
  File "C:\Python32\lib\logging\handlers.py", line 1150, in flush
    self.target.handle(record)
AttributeError: 'ConvertingDict' object has no attribute 'handle'

----------
components: Library (Lib)
files: bug-logging.py
messages: 184866
nosy: plemarre
priority: normal
severity: normal
status: open
title: logging.config.ConvertingDict issue with MemoryHandler
type: crash
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file29527/bug-logging.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17508>
_______________________________________


More information about the New-bugs-announce mailing list