On 10/23/06, Michael Bayer <[EMAIL PROTECTED]> wrote: > > 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') > yes most people just use the root logger which is ok for programs but bad for api's
> 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. > we actually do it in two steps hence the configfile ( posted that one in my other email), first step is below the second is being taken care of by this little module http://trac.turbogears.org/turbogears/browser/trunk/turbogears/config.py > is that what turbogears does ? anyone see any downside to this ? > yes indeed TG pulls in a logger for each component controllers.py:log = logging.getLogger("turbogears.controllers") controllers.py: msglog = logging.getLogger('cherrypy.msg') controllers.py: accesslog = logging.getLogger("turbogears.access") database.py:log = logging.getLogger("turbogears.database") ... lists goes on > > 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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---