Reputation: 1
I used p6spy/log4jdbc to capture the sql queries along with the bind parameters, connecting to Oracle database (hibernate 4.3.5 and oracle 10g is used) and push it to log files which are configured using logback.
The datasource is created by providing the proxy details required for p6spy/log4jdbc.
But, is there any way to enable/disable this feature and switch back to oracle datasource at runtime?
I guess it requires a runtime switch of datasource at runtime..?
Is there any other approach to capture the sql queries along with bind parameters with out using any external libraries like p6spy/log4jdbc..?
Upvotes: 0
Views: 383
Reputation: 848
You can disable the logging for P6Spy by simply changing your logging configuration. Just change it from INFO to WARN or higher to disable the logging.
Upvotes: 0