diff options
author | Julien HENRY <henryju@yahoo.fr> | 2016-07-05 17:05:34 +0200 |
---|---|---|
committer | Julien HENRY <henryju@yahoo.fr> | 2016-07-06 09:32:40 +0200 |
commit | 99aa7e8a80ba86da975059a59295c07666240d4a (patch) | |
tree | 81052e633ba73621e54a895893308a4d35d7ec16 /sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java | |
parent | 6da2fd6aea26d9d29c3d3f39419e000009be9c14 (diff) | |
download | sonarqube-99aa7e8a80ba86da975059a59295c07666240d4a.tar.gz sonarqube-99aa7e8a80ba86da975059a59295c07666240d4a.zip |
Rename package org.sonar.batch to org.sonar.scanner
Diffstat (limited to 'sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java index 41a741bbd08..a330b6c37d0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/LoggingConfiguration.java @@ -21,12 +21,9 @@ package org.sonar.batch.bootstrapper; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Maps; - import java.util.Map; - import javax.annotation.CheckForNull; import javax.annotation.Nullable; - import org.apache.commons.lang.StringUtils; /** @@ -35,6 +32,10 @@ import org.apache.commons.lang.StringUtils; public final class LoggingConfiguration { public static final String PROPERTY_ROOT_LOGGER_LEVEL = "ROOT_LOGGER_LEVEL"; + /** + * @deprecated since 5.2 there is no more db access from scanner side + */ + @Deprecated public static final String PROPERTY_SQL_LOGGER_LEVEL = "SQL_LOGGER_LEVEL"; public static final String PROPERTY_FORMAT = "FORMAT"; @@ -84,7 +85,7 @@ public final class LoggingConfiguration { public LoggingConfiguration setVerbose(boolean verbose) { return setRootLevel(verbose ? LEVEL_ROOT_VERBOSE : LEVEL_ROOT_DEFAULT); } - + public boolean isVerbose() { return verbose; } @@ -116,16 +117,20 @@ public final class LoggingConfiguration { return addSubstitutionVariable(PROPERTY_ROOT_LOGGER_LEVEL, level); } + /** + * @deprecated since 5.2 there is no more db access from scanner side + */ + @Deprecated public LoggingConfiguration setShowSql(boolean showSql) { - return addSubstitutionVariable(PROPERTY_SQL_LOGGER_LEVEL, showSql ? "TRACE" : "WARN"); + return this; } + /** + * @deprecated since 5.2 there is no more db access from scanner side + */ + @Deprecated public LoggingConfiguration setShowSql(Map<String, String> properties, @Nullable Map<String, String> fallback) { - String logLevel = getFallback("sonar.log.level", properties, fallback); - String deprecatedProfilingLevel = getFallback("sonar.log.profilingLevel", properties, fallback); - boolean sql = "TRACE".equals(logLevel) || "FULL".equals(deprecatedProfilingLevel); - - return setShowSql(sql); + return this; } @VisibleForTesting |