Skip to main content

NoORM Forum Start

  4 posts   Feedicon  
Replies: 3 - Last Post: January 05, 2013 15:03
by: Ulf Pietruschka
« Older Topic » Newer Topic
showing 1 - 4 of 4
Posted: October 19, 2012 07:12 by Ulf Pietruschka
Hi all,

this is the new NoORM users and developers forum.
Feel encouraged to ask or participate on whatever topic concerning NoORM.

cheers,

Ulf
Posted: January 04, 2013 10:30 by Anonymous User
Hi Ulf,

Can you log JDBC statement (Query or stored procedure call) and it's parameters ?
Posted: January 05, 2013 15:03 by Ulf Pietruschka
Hi,

JDBC statements and stored procedure calls are logged with log level DEBUG (in an application server using java.util.logging, this is level FINE). This looks like:

15:50:49.681 [main] DEBUG o.noorm.jdbc.JDBCStatementProcessor - Preparing and executing PL/SQL Call: { call department_service.find_departments_by_id(p_department_set => ?,p_department_id => ?) }; using connection : oracle.jdbc.driver.LogicalConnection@10721b0


or

15:50:49.675 [main] DEBUG o.noorm.jdbc.JDBCStatementProcessor - Updating V_DEPARTMENTS.
Using update statement: UPDATE V_DEPARTMENTS SET DEPARTMENT_NAME = :DEPARTMENT_NAME,MANAGER_ID = :MANAGER_ID,LOCATION_ID = :LOCATION_ID WHERE DEPARTMENT_ID = :DEPARTMENT_ID


Input parameter values for stored procedures are also logged (DEBUG/FINE):

15:50:49.685 [main] DEBUG o.noorm.jdbc.JDBCStatementProcessor - Calling PL/SQL procedure employee_search.find_employees_by_filter
Input parameters: p_last_name : King
                  p_hire_date_to : NULL
                  p_salary_to : NULL
                  p_salary_from : NULL
                  p_job_title : NULL
                  p_hire_date_from : NULL
Bean Class:        org.noorm.test.hr.beans.EmployeesBean
15:50:49.685 [main] DEBUG org.noorm.jdbc.DataSourceProvider - Acquiring new connection from connection pool.
15:50:49.685 [main] DEBUG org.noorm.jdbc.DataSourceProvider - Acquired connection : oracle.jdbc.driver.LogicalConnection@54c4ad
15:50:49.685 [main] DEBUG o.noorm.jdbc.JDBCStatementProcessor - Preparing and executing PL/SQL Call: { call employee_search.find_employees_by_filter(p_employee_set => ?,p_last_name => ?) }; using connection : oracle.jdbc.driver.LogicalConnection@54c4ad


Hope this helps ...

Ulf
Posted: January 04, 2013 17:56 by Anonymous User
Thanks
Happy New Year!
Replies: 3 - Last Post: January 05, 2013 15:03
by: Ulf Pietruschka
« Older Topic » Newer Topic
 
 
Close
loading
Please Confirm
Close