diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-11-16 14:55:52 +0100 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-11-16 18:27:53 +0100 |
commit | d8ab0e315ef875f4d3b37755fc55bab7ba4afa76 (patch) | |
tree | bd76ae47974763ace2311c2cb2c030b68bd83b92 /sonar-application | |
parent | 13eb9d2e1287df1244196ef84d659a069c6e25f5 (diff) | |
download | sonarqube-d8ab0e315ef875f4d3b37755fc55bab7ba4afa76.tar.gz sonarqube-d8ab0e315ef875f4d3b37755fc55bab7ba4afa76.zip |
SONAR-8335 most accurate property rather than lowest level must apply
Diffstat (limited to 'sonar-application')
-rw-r--r-- | sonar-application/src/main/assembly/conf/sonar.properties | 3 | ||||
-rw-r--r-- | sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties index 8a0cdcb4686..600a357ed23 100644 --- a/sonar-application/src/main/assembly/conf/sonar.properties +++ b/sonar-application/src/main/assembly/conf/sonar.properties @@ -222,7 +222,8 @@ #sonar.log.level=INFO # Level of logs of each process can be controlled individually with their respective properties. -# Supported values are INFO (default), DEBUG and TRACE +# When specified, they overwrite the level defined at global level. +# Supported values are INFO, DEBUG and TRACE #sonar.log.level.app=INFO #sonar.log.level.web=INFO #sonar.log.level.ce=INFO diff --git a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java index d9505785f70..c58854b8032 100644 --- a/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java +++ b/sonar-application/src/test/java/org/sonar/application/AppLoggingTest.java @@ -198,6 +198,16 @@ public class AppLoggingTest { } @Test + public void root_logger_level_is_configured_from_app_property_over_global_property() { + props.set("sonar.log.level", "TRACE"); + props.set("sonar.log.level.app", "DEBUG"); + + LoggerContext ctx = underTest.configure(props); + + verifyRootLogLevel(ctx, Level.DEBUG); + } + + @Test public void root_logger_level_changes_with_app_property_and_is_case_insensitive() { props.set("sonar.log.level.app", "debug"); |