Hi Mybatis, your answers would be thankful!.
Currently, my company wants to override your prepare statement query with our own pattern. As we saw that your class PreparedStatementLogger
, ConnectionLogger
.. etc are final class. In fact, we don't want to write a log with your pattern. And also don't want to remove the breakline. It makes our log difficult to monitor. And somehow we can't copy-paste query to DB IDE.
==> Preparing: SELECT ........
==> Parameters: ..................
<== Total: 2
Comment From: shootercheng
The log level can be adjusted, and interceptors can be defined to output sql and param
Comment From: siengsotheara
@shootercheng Do you have an example ?
Comment From: shootercheng
@siengsotheara Take a look at this example, which may help you. SqlParamInterceptor.java
Comment From: elfhazard
@siengsotheara myBatis logging is base on org.apache.ibatis.logging.jdbc.BaseJdbcLogger. It is strongly linked to other classes in the library. It is recommended to use the log4jdbc library.
https://kutar37.tistory.com/entry/log4jdbc-%EC%A0%81%EC%9A%A9