[IronPython] Cannot use logging module with ipy?
M. David Peterson
xmlhacker at gmail.com
Wed Jul 19 18:42:42 CEST 2006
This ones easy...
> logger.debug('The Yankees needs no.5 starter!')
Anytime you mention the "Y" word inside of software developed by Mariners
fans is going to cause "problems" ;)
DISCLAIMER: Just in case, this is COMPLETELY, 100% *not true*. In other
words, it's a joke of which to understand requires an understanding of the
history between the Seattle Mariners and New York Yankees.
On 7/19/06, peter lin <dingyi.lin at gmail.com> wrote:
>
> 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.
>
>
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
>
--
/M:D
M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060719/2a57aa23/attachment.html>
More information about the Ironpython-users
mailing list