|
|
@ -86,6 +86,13 @@ public class LevelRemappingAppenderTests {
|
|
|
|
assertThat(this.logCaptor.getAllValues().get(1).getLevel(), equalTo(Level.WARN));
|
|
|
|
assertThat(this.logCaptor.getAllValues().get(1).getLevel(), equalTo(Level.WARN));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
|
|
|
public void notRemapped() throws Exception {
|
|
|
|
|
|
|
|
this.appender.append(mockLogEvent(Level.TRACE));
|
|
|
|
|
|
|
|
verify(this.logger).callAppenders(this.logCaptor.capture());
|
|
|
|
|
|
|
|
assertThat(this.logCaptor.getAllValues().get(0).getLevel(), equalTo(Level.TRACE));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ILoggingEvent mockLogEvent(Level level) {
|
|
|
|
private ILoggingEvent mockLogEvent(Level level) {
|
|
|
|
ILoggingEvent event = mock(ILoggingEvent.class);
|
|
|
|
ILoggingEvent event = mock(ILoggingEvent.class);
|
|
|
|
given(event.getLevel()).willReturn(level);
|
|
|
|
given(event.getLevel()).willReturn(level);
|
|
|
|