On Wed, Nov 16, 2011 at 8:58 AM, sword <john...@gmail.com> wrote:
> I just scaned through the beginer's guide of logging module, but I
> can't get anything from console. The demo just like this:
>
> import logging
> logging.debug("This is a demo")
>
> Maybe I should do sth to put the log to stdout in basicConfig first?

Actually, the problem is not of the output location, but of the
logging level.  In the default configuration, logs at DEBUG level are
suppressed.  logging.basicConfig will be a simple way to change this.
Are you following the logging documentation at
http://docs.python.org/py3k/howto/logging.html#logging-basic-tutorial?
 This page is part of the documentation of the logging module, and is
suitable for first-time logging module users.

In your case, you can do this:

import logging
logging.basicConfig(level=logging.DEBUG)
logging.debug("This is a demo")

-- 
regards,
kushal
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to