hey with regards to all this logging, as I expected people are having  
problems with my new logging setup already.

I think what we're going to see mostly is that people who are already  
using logging for their programs have read the Python docs for the  
logging module, and set up their logging like this:

        import logging
        logging.basicConfig(level=logging.DEBUG)
        logging.debug('A debug message')

since the above is configuring the root logger, it opens up all  
sqlalchemy logging up wide.

So as I was writing the FAQ entry lecturing everyone to not open up  
their root loggers like that, it occured to me that i could just have  
sqlalchemy's config just do:

        logging.getLogger('sqlalchemy').setLevel(logging.ERROR)

that way configuring the root logger would have no affect on SA's  
logging; youd still have to name SA's loggers explicitly.

is that what turbogears does ?    anyone see any downside to this ?


On Oct 23, 2006, at 12:36 PM, Robin Munn wrote:

>
> On 10/23/06, Karl Guertin <[EMAIL PROTECTED]> wrote:
>>
>> On 10/23/06, Robin Munn <[EMAIL PROTECTED]> wrote:
>>> 0 would work too, of course, since it's a false value in Boolean
>>> contexts. The code never checks for "if echo == False", but always a
>>> simple "if echo:" test, so 0, or an empty list, or any other false
>>> value will work.
>>
>> In theory, yes. In practice, I find I get logging for any value other
>> than False for sqlalchemy.echo. I'm not sure if this value even gets
>> into the SA code or if it's handled by something in TG. I've always
>> been working on something else when I ran into it, so I haven't  
>> looked
>> into it beyond thinking that it was odd.
>
> Huh. That *is* odd. Maybe it's getting interpreted as a string
> somewhere, resulting in the string "False"...?
>
> I don't have time to look at it, though. I'll have to leave that to
> someone else.
>
> -- 
> Robin Munn
> [EMAIL PROTECTED]
> GPG key 0xD6497014
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" 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/sqlalchemy
-~----------~----~----~----~------~----~------~--~---

Reply via email to