On Sat, Aug 11, 2007 at 02:28:31AM -0700, Mike Orr wrote:
> On 8/11/07, Christoph Haas <[EMAIL PROTECTED]> wrote:
> >
> > On Fri, Aug 10, 2007 at 09:31:58PM -0700, Mike Orr wrote:
> > > How do I get the Pylons logging to work in 0.9.6?  I tried a few
> > > variations on "import logging;
> > > logging.basicConfig(level=logging.DEBUG)" in environment.py and
> > > middleware.py, but no log output.
> >
> > Do you like to log from your application?
> 
> I mainly wanted to turn on the built-in Pylons debugging.
> 
> > # Logging Setup
> > [loggers]
> > keys = root,myapplication
> >
> > [logger_myapplication]
> > level = DEBUG
> > handlers = myapplication
> > qualname = myapplication
> > propagate = 0
> >
> > [handlers]
> > keys = console,myapplication
> >
> > [formatters]
> > keys = generic,myapplication
> 
> Most of the variable names are self-explanatory from the logging
> module, but what do these 'keys' variables mean?

I believe every formatter/handler/logger has to be mentioned in the keys
directive.

> And where is this all set up?  I grepped all over Paste, Pylons, and
> the application template and I see lots of calls to log things, but
> nothing to configure the logging.

As part of Paste. Paste includes logging and parses the development.ini
as a logging configuration setup file. That's rather magical and hardly
documented. :)

> > [logger_root]
> > level = INFO
> > handlers = console
> 
> So if I set this one to 'level = DEBUG' I should see everything?

Yep. Works here with 0.9.6rc1.

 Christoph


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to