Use logback as default logging implementation

Issue: #53278727
This commit is contained in:
Phillip Webb
2013-07-12 11:15:06 -07:00
parent 0ec0851a4f
commit 95373af374
6 changed files with 55 additions and 15 deletions

View File

@@ -42,17 +42,18 @@ public class SpringCompilerAutoConfiguration extends CompilerAutoConfiguration {
"org.springframework.bootstrap.SpringApplication").add(
"org.springframework.zero", "spring-autoconfigure",
"0.5.0.BUILD-SNAPSHOT");
dependencies.ifAnyResourcesPresent("logback.xml").add("ch.qos.logback",
"logback-classic", "1.0.7");
dependencies.ifNotAdded("cg.qos.logback", "logback-classic")
.ifAnyResourcesPresent("log4j.properties", "log4j.xml")
.add("org.slf4j", "slf4j-log4j12", "1.7.5")
.add("log4j", "log4j", "1.2.16")
.add("org.slf4j", "jcl-over-slf4j", "1.7.5");
dependencies.ifNotAdded("ch.qos.logback", "logback-classic")
.ifNotAdded("org.slf4j", "slf4j-log4j12")
.add("org.slf4j", "slf4j-jdk14", "1.7.5")
.add("org.slf4j", "jcl-over-slf4j", "1.7.5");
// FIXME currently broken on CI + decide how relates to logging
// dependencies.ifAnyResourcesPresent("logback.xml").add("ch.qos.logback",
// "logback-classic", "1.0.7");
// dependencies.ifNotAdded("cg.qos.logback", "logback-classic")
// .ifAnyResourcesPresent("log4j.properties", "log4j.xml")
// .add("org.slf4j", "slf4j-log4j12", "1.7.5")
// .add("log4j", "log4j", "1.2.16")
// .add("org.slf4j", "jcl-over-slf4j", "1.7.5");
// dependencies.ifNotAdded("ch.qos.logback", "logback-classic")
// .ifNotAdded("org.slf4j", "slf4j-log4j12")
// .add("org.slf4j", "slf4j-jdk14", "1.7.5")
// .add("org.slf4j", "jcl-over-slf4j", "1.7.5");
// FIXME get the version
}

View File

@@ -54,16 +54,21 @@ public class SampleIntegrationTests {
private ByteArrayOutputStream output;
private PrintStream savedErr;
@Before
public void init() {
this.savedOutput = System.out;
this.savedErr = System.err;
this.output = new ByteArrayOutputStream();
System.setOut(new PrintStream(this.output));
System.setErr(new PrintStream(this.output));
}
@After
public void clear() {
System.setOut(this.savedOutput);
System.setErr(this.savedErr);
}
private String getOutput() {