Hi,
This patch allows JDBC to log SQL queries that are being sent to the
backend (including prepared/callable statements). It can be quite useful
when writing/debugging java applications that rely on dynamic queries.
The log is sent to the standard log stream managed by the DriverManager.
It can be enabled by adding a ?logtype=X to the URL. X, specifies the
type of statement to log. Currently, only type "all" is supported i.e.
log all statements going to the backend. The logging can also be turned
on/off by calling [enable|disable]SQLLogType(int type).
Also, since variable length is prepares/callable statements can be too
large, the number of characters of the variable value to be displayed
can be adjusted via setMaxSQLLogVarLen(). There is a upper limit of 256
and a lower limit of 32 characters.
Deepak
--
Deepak Bhole <dbhole@redhat.com>
Red Hat Canada Ltd.