[IronPython] Cannot use logging module with ipy?

peter lin dingyi.lin at gmail.com
Wed Jul 19 17:36:50 CEST 2006


Dear Sir,
   I test the logging module with ipy

 import sys
 sys.path.append(r"c:\python24\lib")
 import logging

 f=logging.FileHandler('c:\\test55.log')
 #formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s -
%(message)s")
 #add formatter to ch
 #f.setFormatter(formatter)
 logger = logging.getLogger("test")
 logger.addHandler(f)
 logger.setLevel(logging.DEBUG)
 logger.debug('The Yankees needs no.5 starter!')

 find the error as follows.
 Traceback (most recent call last):
  File c:\dev_tool\IronPython-1.0-Beta9\rsslibtest.py, line 50, in
Initialize
  File __init__, line unknown, in debug
  File c:\python24\lib\logging\__init__.py, line 955, in debug
  File c:\python24\lib\logging\__init__.py, line 1072, in _log
  File c:\python24\lib\logging\__init__.py, line 1047, in findCaller
  File , line 0, in _getframe##96
ValueError: _getframe is not implemented

Test it in python, it runs ok.

I guess it's another python standard library not yet to find its way to ipy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060719/29351e93/attachment.html>


More information about the Ironpython-users mailing list