On Tue, Feb 24, 2009 at 4:10 PM, Philip Jenvey <[email protected]> wrote:
>
>
> On Feb 24, 2009, at 3:49 PM, Shannon -jj Behrens wrote:
>
>> It's weird that the default setup in development.ini is:
>>
>> [handler_console]
>> class = StreamHandler
>> args = (sys.stderr,)
>> level = NOTSET
>> formatter = generic
>>
>> I used log.warn in my controller and it didn't go to stderr.  I
>> changed level to INFO so I can see the logging message.
>
>
> Works for me. The console handler isn't filtering anything, its level
> is NOTSET so it should be logging everything that goes through it.
>
> The Pylons project's top level package should have its own logger set
> to DEBUG by default, which means any logger under it, like
> myapp.controllers.mycontroller, should be sending WARN to the console
> handler.

The default level is set to INFO, while the application level is DEBUG
(for all modules in the application package).  This can lead to debug
messages from other modules not showing up.  When I'm doing ad-hoc
debugging, sometimes I log messages as warn or error to avoid having
to change the configuration.

I think there might have been a few times I couldn't get WARN messages
through but I don't remember the circumstances.

If you make a new config file via paster, its default level is INFO
throughout.  I change that to WARN for production.ini.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
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