summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-10-18 10:59:35 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-10-18 10:59:50 +0200
commitcd7a0433f7b0f6f75d0764209caf31918688090d (patch)
tree07d8b4c74188f022384f8b16e49d2e5bb927f295
parentbde684ed372600cc67e02b9535c1b653e75563fd (diff)
downloadsonarqube-cd7a0433f7b0f6f75d0764209caf31918688090d.tar.gz
sonarqube-cd7a0433f7b0f6f75d0764209caf31918688090d.zip
SONAR-2916 Default logging level should be INFO on server side
-rw-r--r--sonar-application/src/main/assembly/conf/logback.xml18
-rw-r--r--sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java4
2 files changed, 10 insertions, 12 deletions
diff --git a/sonar-application/src/main/assembly/conf/logback.xml b/sonar-application/src/main/assembly/conf/logback.xml
index e84e65ad635..6ceeb88ce57 100644
--- a/sonar-application/src/main/assembly/conf/logback.xml
+++ b/sonar-application/src/main/assembly/conf/logback.xml
@@ -38,16 +38,14 @@
</appender>
<!--
- Profiling of JRuby on Rails requests . Uncomment in order to log HTTP and SQL requests.
- Execute the following command to get the HTTP requests with execution time > 10s :
+ Profiling of HTTP requests. Set level to DEBUG in order to log all the HTTP and SQL requests.
+ Example of command-line to get the HTTP requests with execution time greater than 10s :
grep 'rails Completed in [0-9]\{5,\}ms' < profiling.log
-->
- <!--
<logger name="rails" additivity="false">
- <level value="DEBUG"/>
+ <level value="INFO"/>
<appender-ref ref="PROFILING_FILE"/>
</logger>
- -->
<logger name="org.hibernate.cache.ReadWriteCache">
@@ -64,17 +62,17 @@
<level value="ERROR"/>
</logger>
+ <logger name="org.hibernate">
+ <level value="WARN"/>
+ </logger>
+
<!-- set INFO to activate Hibernate SQL statistics. NOT RECOMMENDED -->
<logger name="org.sonar.DBSTATISTICS">
<level value="ERROR"/>
</logger>
- <logger name="org.sonar.INFO">
- <level value="INFO"/>
- </logger>
-
<root>
- <level value="WARN"/>
+ <level value="INFO"/>
<appender-ref ref="SONAR_FILE"/>
</root>
diff --git a/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java b/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java
index 5015f4ac326..67e01b20962 100644
--- a/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java
+++ b/sonar-server/src/main/java/org/sonar/server/filters/FilterExecutor.java
@@ -47,9 +47,9 @@ public class FilterExecutor implements ServerComponent {
String sql = null;
try {
- TimeProfiler profiler = new TimeProfiler(FilterExecutor.class).start("Build/execute SQL query");
+ TimeProfiler profiler = new TimeProfiler(FilterExecutor.class).setLevelToDebug().start("Build/execute SQL query");
sql = toSql(filter);
- LOG.info("SQL: " + sql);
+ LOG.debug("SQL: " + sql);
Query query = session.getEntityManager().createNativeQuery(sql);
setHqlParameters(filter, query);
FilterResult result = new FilterResult(filter, query.getResultList());