输入示例
[2024-05-01 08:30:00.123] [DEBUG] com.example.mapper.UserMapper.selectUsers.debug(42) - ==> Preparing: SELECT id, username FROM t_user WHERE status = ? AND username LIKE ? LIMIT ?
[2024-05-01 08:30:00.124] [DEBUG] com.example.mapper.UserMapper.selectUsers.debug(42) - ==> Parameters: 1(Integer), %张%(String), 10(Integer)
[2024-05-01 08:30:00.125] [DEBUG] com.example.mapper.UserMapper.selectUsers.debug(42) - <== Total: 3
转换规则
- 识别
==> Preparing: 与 ==> Parameters: 成对日志,可一次粘贴多条 SQL。
- 兼容 Spring Boot、Logback 等常见时间戳与日志前缀,只提取 SQL 部分。
- String 与日期加单引号并转义
';null → NULL;数字与布尔值原样输出。
- 保留
Total / Updates 行数,显示在结果摘要中。
- 所有内容只在浏览器本地处理,日志不会上传到任何服务器。