diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2019-06-10 12:23:28 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-06-28 08:45:46 +0200 |
commit | 7e270ada5f52d2181577c6afa9e923d4f5a7cf7b (patch) | |
tree | 4e74cd48d3bceefe2ad9664fc7c68fca8879aaa0 /server/sonar-process/src/test | |
parent | b9762a773c2cc3fa2f9df6e9a3f9920aa3b8d809 (diff) | |
download | sonarqube-7e270ada5f52d2181577c6afa9e923d4f5a7cf7b.tar.gz sonarqube-7e270ada5f52d2181577c6afa9e923d4f5a7cf7b.zip |
SC-702 decouple Logback appenders from encoders
Diffstat (limited to 'server/sonar-process/src/test')
-rw-r--r-- | server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java b/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java index e865ef0c1bb..4d07ae721ea 100644 --- a/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java +++ b/server/sonar-process/src/test/java/org/sonar/process/logging/LogbackHelperTest.java @@ -206,7 +206,11 @@ public class LogbackHelperTest { @Test public void newConsoleAppender() { LoggerContext ctx = underTest.getRootContext(); - ConsoleAppender<?> appender = underTest.newConsoleAppender(ctx, "MY_APPENDER", "%msg%n"); + PatternLayoutEncoder encoder = new PatternLayoutEncoder(); + encoder.setContext(ctx); + encoder.setPattern("%msg%n"); + encoder.start(); + ConsoleAppender<?> appender = underTest.newConsoleAppender(ctx, "MY_APPENDER", encoder); assertThat(appender.getName()).isEqualTo("MY_APPENDER"); assertThat(appender.getContext()).isSameAs(ctx); |