Patches item #1417339, was opened at 2006-01-28 13:51
Message generated for change (Comment added) made by mfi
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Maxim F. Ischenko (mfi)
Assigned to: Nobody/Anonymous (nobody)
Summary: debug SQL queries recorded through logging module
Initial Comment:
The patch adds support for standard logging module for
DBConnection classes which is crucial for using
sqlobject in cgi scripts -- you can't use STDOUT
because it is sent to the browser.
Logging is activated if user specifies logger key, the
key also serves as a logger name to be used.
This is a duplicate of the previous ticket, only with a
file attacheed (hope so).
----------------------------------------------------------------------
>Comment By: Maxim F. Ischenko (mfi)
Date: 2006-02-03 18:52
Message:
Logged In: YES
user_id=113894
Oleg, I spent half an hour the other day trying to
create/run a test but haven't succeed. So, no, I cannot
provide a test.
I you're not willing to submit the patch in the current
form, well, so be it.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2006-02-03 18:27
Message:
Logged In: YES
user_id=4799
I see you patch sqlobject/tests/dbtest.py but do not create
any test. If it's not too hard can you also add a test that
at least call setupLogging() and run a few SQL queries to
make sure logging works. Even better - log to a file and
test if the file contains what is expected.
----------------------------------------------------------------------
Comment By: Maxim F. Ischenko (mfi)
Date: 2006-02-01 10:36
Message:
Logged In: YES
user_id=113894
Here is new patch
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2006-01-31 18:57
Message:
Logged In: YES
user_id=4799
Aha, that's better. Can you aslo add a test that sets up a
logger (logging to a stderr or a separate file) and a patch
for documentation (describe the "logger" keyword in a DB URI)?
----------------------------------------------------------------------
Comment By: Maxim F. Ischenko (mfi)
Date: 2006-01-31 18:04
Message:
Logged In: YES
user_id=113894
Oleg, I was considered checking for logging module but then
decided that if a person specifies 'logger' parameter to db
connection then he should know what he's doing.
If you insist, I can add some way of handling this error but
please elaborate how exactly do you want me to handle it.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2006-01-31 17:39
Message:
Logged In: YES
user_id=4799
Module logging is only available in Python 2.3. SQLObject is
supposed to work with Python 2.2. You have to catch
ImportError and provide a graceful fallback.
After 0.8 I'd like to deprecate support for Python 2.2.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1417339&group_id=74338
|