So I'm a newbie with trac, ... When I have worked on other database backed web applications, I have found it useful during debugging to have every database query logged. Logging the database queries during actual production is an enormous privacy hole, but logging queries during debugging is so so nice.
I can see that none of the files in the database api do any logging, and some have commented out print statements. I would like to change that, but before I do so, I am curious if there is any specific reason the trac db does not use logging, or if it is just an outcome of the trac class architecture. That is, were I to add query logging, would that be appreciated, or would it violate some trac design principle? If I do go ahead, I am looking to find what is hopefully the single spot, or the few spots, through which all queries flow. That would seem to be in trac/db/util.py IterableCursor::execute() and IterableCursor::executemany(). Now the log is kept in the Environ. Is there any way in which code in the database api can determine the current Environ? If not, then what I think is possible is to add/modify some sort of debug connection wrapper so that the connection wrapper keeps track of the log and somehow (waives hands once more) makes that available to the IterableCursor or a new debug subclass of IterableCursor. But if anyone wants to provide any tips, hints, or warnings (don't cross the streams), that would be appreciated. Thanks, Jerry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" 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/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
