Message184866
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' |
|
Date |
User |
Action |
Args |
2013-03-21 12:34:27 | plemarre | set | recipients:
+ plemarre |
2013-03-21 12:34:27 | plemarre | set | messageid: <1363869267.93.0.47675906919.issue17508@psf.upfronthosting.co.za> |
2013-03-21 12:34:27 | plemarre | link | issue17508 messages |
2013-03-21 12:34:27 | plemarre | create | |
|