You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using datasource-proxy-spring-boot-starter1.8.1 with spring boot 2.5.15.
Beside adding the above dependency, I also configured: decorator.datasource.datasource-proxy.query.log-level=INFO
Then I started to see the queries logged at the info level, as expected.
However, I wasn't able to configure slow-queries to be logged using the properties:
decorator.datasource.datasource-proxy.slow-query.enable-logging=true
decorator.datasource.datasource-proxy.slow-query.log-level=WARN
decorator.datasource.datasource-proxy.slow-query.threshold=50
I'd like to log at WARN level all the queries that took longer than 50 milliseconds (although the doc says that the threshold property value is in seconds, I think that's a mistake).
After adding the above slow-query configs I still see all the logs at INFO level including the queries with longer execution time than 50 ms.
The only way I'm able to see logs at WARN level is to set the threshold to 0. Then all the logs will be with WARN.
My goal is to log only slow-queries at WARN level. Please help.
Regards,
Roland
The text was updated successfully, but these errors were encountered:
decorator:
datasource:
enabled: true #Enable the decoratordatasource-proxy:
# Use only one of thismultiline: falsejson-format: falseformat-sql: trueslow-query:
enable-logging: truethreshold: 300#Default threshold value Log for slow querylog-level: WARN #defaultquery:
enable-logging: true #defaultlog-level: DEBUG #default
I have the slow query (305 over my threshold) logged on SLF4JQueryLoggingListener
Hi,
I'm using datasource-proxy-spring-boot-starter 1.8.1 with spring boot 2.5.15.
Beside adding the above dependency, I also configured:
decorator.datasource.datasource-proxy.query.log-level=INFO
Then I started to see the queries logged at the info level, as expected.
However, I wasn't able to configure slow-queries to be logged using the properties:
decorator.datasource.datasource-proxy.slow-query.enable-logging=true
decorator.datasource.datasource-proxy.slow-query.log-level=WARN
decorator.datasource.datasource-proxy.slow-query.threshold=50
I'd like to log at WARN level all the queries that took longer than 50 milliseconds (although the doc says that the threshold property value is in seconds, I think that's a mistake).
After adding the above slow-query configs I still see all the logs at INFO level including the queries with longer execution time than 50 ms.
The only way I'm able to see logs at WARN level is to set the threshold to 0. Then all the logs will be with WARN.
My goal is to log only slow-queries at WARN level. Please help.
Regards,
Roland
The text was updated successfully, but these errors were encountered: