Logging PreparedStatements in Java

前端 未结 4 1603
终归单人心
终归单人心 2020-12-24 03:22

One thing that always been a pain is to log SQL (JDBC) errors when you have a PreparedStatement instead of the query itself.

You always end up with messages like:

4条回答
  •  萌比男神i
    2020-12-24 04:06

    Use P6Spy: Its Oracle, Mysql, JNDI, JMX, Spring and Maven friendly. Highly configurable. Simple and low level integration Can print the stacktrace. Can only print heavy calls - time threashold based.

提交回复
热议问题