Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application property "decorator.datasource.p6spy.log-filter.pattern" is not working as expected #99

Open
abhishekjoy1 opened this issue Jun 22, 2024 · 1 comment

Comments

@abhishekjoy1
Copy link

Hi, I am using the following dependencies for p6spy in my Spring boot project:

<dependency>
    <groupId>com.github.gavlyukovskiy</groupId>
    <artifactId>p6spy-spring-boot-starter</artifactId>
    <version>1.7.1</version>
</dependency>

<dependency>
    <groupId>com.github.gavlyukovskiy</groupId>
    <artifactId>datasource-decorator-spring-boot-autoconfigure</artifactId>
    <version>1.7.1</version>
</dependency>

<dependency>
    <groupId>p6spy</groupId>
    <artifactId>p6spy</artifactId>
    <version>3.9.1</version>
</dependency>

Related property values in application.properties are as follows:

decorator.datasource.p6spy.log-format=%(executionTime)|%(category)|connection%(connectionId)|%(sqlSingleLine)
decorator.datasource.p6spy.log-filter.pattern=\d+\|statement\|(.*)$
decorator.datasource.p6spy.tracing.include-parameter-values=true

Here everything is working as expected except for the log filter, all rollback and commit statements are still getting printed in the log:

0|rollback|connection1|
1|commit|connection1|

Not sure, if I am missing anything.

@gavlyukovskiy
Copy link
Owner

@abhishekjoy1 it's hard for me to debug this without more details. Please provide a minimal sample project where the problem can be reproduced easily.
P.S. you're using quite old version, please update to 1.9.1 (Spring Boot 3) or 1.8.1 (Spring Boot 2) first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants