Convert mybatis's log to SQL
Replace all
?
characters to parameters.
https://wickso.me/mybatis-log-to-sql/
AS-IS
2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Preparing: SELECT * FROM table WHERE id = ?
2017-10-08 17:39:34 [DEBUG](BaseJdbcLogger.java:159) ==> Parameters: 2001(Integer)
TO-BE
SELECT * FROM table WHERE id = 2001
CLI
Install
$ git clone https://github.com/wicksome/mybatis-log-to-sql.git$ cd mybatis-log-to-sql && npm init
Usage
$ node index.js>> SQL: 2017-10-08 17:39:34 [DEBUG] ==> Preparing: SELECT * FROM table WHERE id = ?>> Parameters: 2017-10-08 17:39:34 [DEBUG] ==> Parameters: 2001--------------------------------------------------------------------------------SELECT * FROM table WHERE id = 2001✔ Copy sql!