spy sql日志记录

This commit is contained in:
2024-09-14 16:59:15 +08:00
parent 06a03291a9
commit 42d7c3c10d

View File

@@ -1,30 +1,30 @@
# p6spy ??????????
#指定要加载的模块列表
modulelist=com.baomidou.mybatisplus.extension.p6spy.MybatisPlusLogFactory,com.p6spy.engine.outage.P6OutageFactory
# ???????
#日志消息格式的实现类
logMessageFormat=com.baomidou.mybatisplus.extension.p6spy.P6SpyLogger
#????????
#指定日志输出 到控制台。
#appender=com.baomidou.mybatisplus.extension.p6spy.StdoutLogger
# ???????? sql
#指定日志输出到 SLF4J 日志框架
appender=com.p6spy.engine.spy.appender.Slf4JLogger
#定义日志文件的名称。
logfile=sql.log
# ?? p6spy driver ??
#是否注销 JDBC 驱动程序(默认不注销)
#deregisterdrivers=true
# ??JDBC URL??
#设置是否在日志消息前添加前缀
useprefix=true
# ???? Log ??,????????error,info,batch,debug,statement,commit,rollback,result,resultset.
#指定要排除的日志类别,不记录这些类别的日志
excludecategories=info,debug,result,commit,resultset
# ????
#设置日志条目的日期时间格式
dateformat=yyyy-MM-dd HH:mm:ss
# SQL????????
#定义数据库方言的时间戳格式。
databaseDialectTimestampFormat=yyyy-MM-dd HH:mm:ss
# ???????
#指定 JDBC 驱动程序列表
#driverlist=org.h2.Driver
# ?????SQL??
#启用故障检测
outagedetection=true
# ?SQL???? 2 ?
#设置故障检测的时间间隔(单位:分钟)
outagedetectioninterval=2
# ???? Log
#启用 SQL 过滤功能
filter=true
# ?? Log ????? sql ?????????
#排除记录包含 "SELECT 1" 的 SQL 查询
exclude=SELECT 1