Logger not logging

Joel Goldstick joel.goldstick at gmail.com
Thu Jan 1 18:49:15 CET 2015


On Thu, Jan 1, 2015 at 12:25 PM, Dan Sommers <dan at tombstonezero.net> wrote:

> On Thu, 01 Jan 2015 10:09:13 -0700, Jason Friedman wrote:
>
> > What am I missing?
> >
> > I expect logger.info("hello") to emit.
> >
> > $ python
> > Python 3.4.0 (default, Apr 18 2014, 19:16:28)
> > [GCC 4.8.1] on linux
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import logging
> >>>> logger = logging.getLogger()
> >>>> logger.setLevel(logging.INFO)
> >>>> logger.info("hello")
> >>>> logger.warn("hello")
> > hello
> >>>>
>
> By default, loggers only log warnings and errors.  Add this:
>
>     logger.setLevel(logging.INFO)
>
> HTH,
> Dan
>

Looks like op did that?

> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150101/e2d95667/attachment.html>


More information about the Python-list mailing list