En Wed, 23 Apr 2008 23:08:49 -0300, James Stroud <[EMAIL PROTECTED]> escribió:

Am I missing something or are the docs for logging hopelessly outdated?

http://docs.python.org/lib/node406.html

For example, quoting the docs

"""
import logging

logging.debug('A debug message')
logging.info('Some information')
logging.warning('A shot across the bows')
"""

And the result is

% /usr/bin/python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
py> import logging
py>
py> logging.debug('A debug message')
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'debug'

Probably you have another logging.py and you're importing it instead of the one in the standard library.

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to