Showing a Spring transaction in log

前端 未结 7 477
名媛妹妹
名媛妹妹 2020-11-30 19:10

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 wh

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 19:48

    Most interesting log informations of JtaTransactionManager.java (if this question is still about the JtaTransactionManager) are logged at DEBUG priority. Assuming you have a log4j.properties somewhere on the classpath, I'd thus suggest to use:

    log4j.logger.org.springframework.transaction=DEBUG
    

提交回复
热议问题