cometta cometta - 2 years ago 129
Java Question

Showing a Spring transaction in log

I configured spring with transactional support. Is there any way to log transactions just to ensure I set up everything correctly? Showing in the log is a good way to see what is happening.

Answer Source

in your (for alternative loggers, or log4j's xml format, check the docs)

Depending on your transaction manager, you can set the logging level of the spring framework so that it gives you more info about transactions. For example, in case of using JpaTransactionManager, you set

(this is the package of the your transaction manager), and also

If INFO isn't enough, use DEBUG

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download