Message184435
In python 2.7 this code works:
>>> import logging.config
>>> import StringIO
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(StringIO.StringIO(a))
>>>
whereas in python 3.3 it raises an exception:
>>> import logging.config
>>> import io
>>> a="""[loggers]
... keys = root
... [logger_root]
... handlers = ""
... [formatters]
... keys = ""
... [handlers]
... keys = ""
... """
>>> logging.config.fileConfig(io.StringIO(a))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py", line 70, in fileConfig
formatters = _create_formatters(cp)
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/logging/config.py", line 114, in _create_formatters
class_name = cp[sectname].get("class")
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/configparser.py", line 942, in __getitem__
raise KeyError(key)
KeyError: 'formatter_""'
>>> |
|
Date |
User |
Action |
Args |
2013-03-18 07:34:49 | Alzakath | set | recipients:
+ Alzakath |
2013-03-18 07:34:49 | Alzakath | set | messageid: <1363592089.61.0.213350705624.issue17453@psf.upfronthosting.co.za> |
2013-03-18 07:34:49 | Alzakath | link | issue17453 messages |
2013-03-18 07:34:49 | Alzakath | create | |
|