Skip to content

Commit e9473ae

Browse files
committed
Configure MySQL connector to log queries that are slower than 500ms.
For travis profile I also enabled explainSlowQueries parameter. @see http://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html No functional changes.
1 parent 423f0da commit e9473ae

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/resources/application-prod.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
spring.profiles: prod
22

3-
spring.datasource.url: jdbc:mysql://localhost:3306/mystamps?logger=com.mysql.jdbc.log.Slf4JLogger&useSSL=false
3+
spring.datasource.url: jdbc:mysql://localhost:3306/mystamps?logger=com.mysql.jdbc.log.Slf4JLogger&useSSL=false&logSlowQueries=true&slowQueryThresholdMillis=500&autoSlowLog=false
44
spring.datasource.username: mystamps
55
spring.datasource.password: q1
66
spring.datasource.driver-class-name: com.mysql.jdbc.Driver

src/main/resources/application-travis.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
spring.profiles: travis
22

3-
spring.datasource.url: jdbc:mysql://localhost:3306/mystamps?logger=com.mysql.jdbc.log.Slf4JLogger&useSSL=false
3+
spring.datasource.url: jdbc:mysql://localhost:3306/mystamps?logger=com.mysql.jdbc.log.Slf4JLogger&useSSL=false&logSlowQueries=true&slowQueryThresholdMillis=500&autoSlowLog=false&explainSlowQueries=true
44
spring.datasource.username: travis
55
spring.datasource.password:
66
spring.datasource.driver-class-name: com.mysql.jdbc.Driver

0 commit comments

Comments
 (0)