diff options
author | Jenkins CI <ci@sonarsource.com> | 2014-09-24 21:30:43 +0200 |
---|---|---|
committer | Jenkins CI <ci@sonarsource.com> | 2014-09-24 21:30:43 +0200 |
commit | a813b87b35008962ce53b8629804c86f236fb8ab (patch) | |
tree | f445fffd4c11f5d6f73fa902da1e679fc2096734 /server/sonar-process | |
parent | 582c3f65221093d7bfbd1972da17fc2f0ee3b7b1 (diff) | |
parent | 85c037c87a728edbefc0fd417d6cb89cab246e44 (diff) | |
download | sonarqube-a813b87b35008962ce53b8629804c86f236fb8ab.tar.gz sonarqube-a813b87b35008962ce53b8629804c86f236fb8ab.zip |
Automatic merge from branch-4.5
* origin/branch-4.5:
SONAR-5621 Merge server log files into a single one
SONAR-5621 merge log files
Update description of "sonar.technicalDebt.ratingGrid"
Diffstat (limited to 'server/sonar-process')
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java index c0909a93fb5..2fb7baa865e 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessLogging.java @@ -19,8 +19,11 @@ */ package org.sonar.process; +import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.classic.joran.JoranConfigurator; +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.Appender; import ch.qos.logback.core.joran.spi.JoranException; import ch.qos.logback.core.util.StatusPrinter; import org.slf4j.LoggerFactory; @@ -43,6 +46,14 @@ public class ProcessLogging { StatusPrinter.printInCaseOfErrorsOrWarnings(context); } + public void addConsoleAppender() { + Logger consoleLogger = (Logger) LoggerFactory.getLogger("console"); + Appender<ILoggingEvent> consoleAppender = consoleLogger.getAppender("CONSOLE"); + + Logger gobblerLogger = (Logger) LoggerFactory.getLogger("gobbler"); + gobblerLogger.addAppender(consoleAppender); + } + /** * Extracted only for unit testing */ |