This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author plemarre
Recipients plemarre
Date 2013-03-21.12:34:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363869267.93.0.47675906919.issue17508@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2013-03-21 12:34:27plemarresetrecipients: + plemarre
2013-03-21 12:34:27plemarresetmessageid: <1363869267.93.0.47675906919.issue17508@psf.upfronthosting.co.za>
2013-03-21 12:34:27plemarrelinkissue17508 messages
2013-03-21 12:34:27plemarrecreate