In a broader sense, the debugging settings should have a bunch of on/
off settings for multiple types of debug output.

On May 29, 1:21 pm, "[email protected]" <[email protected]> wrote:
> We have been setting web.debug.config = True and find it very useful
> both for the information and the provided timings.  There are however,
> sometimes that the information is too verbose - web.py is printing
> every sql statement to the apache log.  We are using database stored
> session management so that gives us several select and update commands
> for each single login.
>
> A simple workaround would be to remove the print statement, but I
> wanted the ability to easily turn this on and off without turning off
> the other hard error debug statements.  By setting web.config.debug =
> FALSE, this removed the sql statements from the apache log but it has
> the side effect of removing any potential true sql errors from the log
> also.  For example, look in the function _def_execute in db.py.  When
> executing a sql query, it is wrapped inside a try..except block.  If
> debug is off and the execute statement fails, the query will still be
> rolled back, but we will not see any information printed to the apache
> log.
>
> What I did locally was to add a new config variable named "queries",
> but it could be named something else like "verbose_sql".  I added a
> line in db.py "self.queries = config.get('queries', False) " near the
> self.printing line and changed the print sql statement line to "if
> self.queries:"  I then have two debug lines in our code when we use
> web.py.  One to keep debugging on and one that will disable verbose
> sql printing unless we need it.
>
> Does anyone else feel like this is a valid change to web.py for a
> future release?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" 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/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to