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

@@ -30,19 +30,22 @@ import static org.junit.Assert.assertTrue;
public class SampleBatchApplicationTests {
private PrintStream savedOutput;
private PrintStream savedErr;
private ByteArrayOutputStream output;
@Before
public void init() {
this.savedOutput = System.err;
this.savedOutput = System.out;
this.savedErr = System.err;
this.output = new ByteArrayOutputStream();
// jdk logging goes to syserr by default
System.setOut(new PrintStream(this.output));
System.setErr(new PrintStream(this.output));
}
@After
public void after() {
System.setErr(this.savedOutput);
System.setOut(this.savedOutput);
System.setErr(this.savedErr);
}
private String getOutput() {