Kevin,

That is exactly what I was thinking of. Thanks for the code, I just briefly looked at it and it appears to be pretty close what I had in mind. After a quick look, the only change that I will probably make is that I will create mine as a wrapper instead of a subclass, and take a Connection and a String, instead of a String and a PreparedStatement. Other than that, it looks great. Thanks!!

--- regards ---
Larry


At 09:41 AM 9/4/03 -0500, you wrote:
Howdy,

At my company, I am in our production support team and I can say that it is VERY helpful to log PreparedStatements with the parameters replaced. This makes it very easy to debug problems with SQL in code. I have attached my wrapper PreparedStatement class. Hopefully this helps.

Kevin LaVergne

At 07:47 AM 9/4/2003, Shapira, Yoav wrote:

Howdy,
I personally am not a big fan of logging these types of objects: I much
prefer logging the beans I create from result sets (or DAO objects, or
whatever we call them this week).  However, one possibility for you
would be to create a ResultSetRenderer (implements
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/or/ObjectRende
rer.html)
or a PreparedStatementRenderer...

Yoav Shapira
Millennium ChemInformatics


>-----Original Message----- >From: Larry Young [mailto:[EMAIL PROTECTED] >Sent: Wednesday, September 03, 2003 8:30 PM >To: [EMAIL PROTECTED] >Subject: logging JDBC objects > >Hello, > > Has anyone looked at logging JDBC objects, like PreparedStatement >and ResultSet classes? They don't have any built-in ways of displaying >their contents, so I'm considering creating a wrapper class to do this for >me, but I thought I'd check the list to see if anyone else has already >solved this problem before I proceed. > >--- regards --- >Larry > > >-------------------------- >Larry Young >The Dalmatian Group >www.dalmatian.com > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to