norm
norm copied to clipboard
Statement logging
What is the recommended way to get Norm log all of the sql statements? I could not access the relevant parts in Query class to add a reliably logging. We are using log4j as backend, but also having an own Logger providing more logging options for writing nice html logs. But at least a log to log4j debug is required.
Thanks
Two choices:
-
Use a JDBC proxy: https://vladmihalcea.com/the-best-way-to-log-jdbc-statements/
-
Modify norm source. It should be pretty easy. I would insert a logging statement in two places, in Query.execute() just above state.executeUpdate(), and in the Query.results() method, just above state.executeQuery().