Filtering 用P6SPY进行过滤
有没有办法在p6spy中设置过滤器,使其只记录“插入/删除/更新”而不记录“选择”SQL语句 文件中提到: “P6Spy允许您监视特定表或特定语句类型” 他们举了一个例子如下: 显示捕获所有 选择语句,但顺序除外 下表:Filtering 用P6SPY进行过滤,filtering,p6spy,Filtering,P6spy,有没有办法在p6spy中设置过滤器,使其只记录“插入/删除/更新”而不记录“选择”SQL语句 文件中提到: “P6Spy允许您监视特定表或特定语句类型” 他们举了一个例子如下: 显示捕获所有 选择语句,但顺序除外 下表: filter = true # comma separated list of tables to include include = select # comma separated list of tables to exclude exclude = orders 所以
filter = true
# comma separated list of tables to include
include = select
# comma separated list of tables to exclude
exclude = orders
所以我想,一定有办法包括插入、删除、更新和排除选择。。。因此,我准备我的属性文件如下:
filter = true
# comma separated list of tables to include
include = insert,update,delete
# comma separated list of tables to exclude
exclude = select
但这似乎不起作用。任何人有任何建议吗?答案的关键在于评论
# comma separated list of tables to include
include = select
select
是表的名称,而不是语句的类型。
似乎不可能轻松地按语句类型进行筛选(至少是按选择/更新/删除)。你可以通过使用
# sql expression to evaluate if using regex filtering
sqlexpression=
#allows you to use a regex engine or your own matching engine to determine
#which statements to log
stringmatcher=com.p6spy.engine.common.GnuRegexMatcher
答案的关键在于评论
# comma separated list of tables to include
include = select
select
是表的名称,而不是语句的类型。
似乎不可能轻松地按语句类型进行筛选(至少是按选择/更新/删除)。你可以通过使用
# sql expression to evaluate if using regex filtering
sqlexpression=
#allows you to use a regex engine or your own matching engine to determine
#which statements to log
stringmatcher=com.p6spy.engine.common.GnuRegexMatcher