aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-04-27 23:23:24 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-04-27 23:41:09 +0400
commit09566e047c391ae32e49bc47f7584a231ee14553 (patch)
tree5941b8eeb751898328ee05d16ecb50bb1b83970a /sonar-core
parent25f963bfb953346ee85337009b1af7d665494aa0 (diff)
downloadsonarqube-09566e047c391ae32e49bc47f7584a231ee14553.tar.gz
sonarqube-09566e047c391ae32e49bc47f7584a231ee14553.zip
SONAR-2299 Show Hibernate SQL only if debug logging level enabled, but not info level
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
index ba3e77928fa..e543fecc28f 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/session/AbstractDatabaseConnector.java
@@ -71,6 +71,7 @@ public abstract class AbstractDatabaseConnector implements DatabaseConnector {
public String getDialectId() {
return dialect.getId();
}
+
/**
* Indicates if the connector is operational : database connection OK and schema version OK
*/
@@ -158,12 +159,12 @@ public abstract class AbstractDatabaseConnector implements DatabaseConnector {
props.put(Environment.DIALECT, getDialectClass());
props.put("hibernate.generate_statistics", getConfiguration().getBoolean(DatabaseProperties.PROP_HIBERNATE_GENERATE_STATISTICS, false));
- props.put("hibernate.show_sql", Boolean.valueOf(LOG_SQL.isInfoEnabled()).toString());
+ props.put("hibernate.show_sql", Boolean.valueOf(LOG_SQL.isDebugEnabled()).toString());
Configuration subset = getConfiguration().subset("sonar.hibernate");
for (Iterator keys = subset.getKeys(); keys.hasNext();) {
String key = (String) keys.next();
- if (StringUtils.isNotBlank((String)subset.getProperty(key))) {
+ if (StringUtils.isNotBlank((String) subset.getProperty(key))) {
props.put("hibernate." + key, subset.getProperty(key));
}
}
@@ -171,7 +172,6 @@ public abstract class AbstractDatabaseConnector implements DatabaseConnector {
// custom impl setup
setupEntityManagerFactory(props);
-
return props;
}