File tree Expand file tree Collapse file tree 2 files changed +8
-18
lines changed
src/test/java/com/baeldung/logback Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Original file line number Diff line number Diff line change 2424 <artifactId >logback-classic</artifactId >
2525 <version >${logback.version} </version >
2626 </dependency >
27+ <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core -->
28+ <dependency >
29+ <groupId >ch.qos.logback</groupId >
30+ <artifactId >logback-core</artifactId >
31+ <version >${logback.version} </version >
32+ </dependency >
2733 <dependency >
2834 <groupId >ch.qos.logback.contrib</groupId >
2935 <artifactId >logback-json-classic</artifactId >
109115 <docx4j .version>3.3.5</docx4j .version>
110116 <angus .mail.version>2.0.1</angus .mail.version>
111117 <angus .activation.version>2.0.0</angus .activation.version>
112- <logback .version>1.5.6 </logback .version>
118+ <logback .version>1.5.18 </logback .version>
113119 <slf4j .version>2.1.0-alpha1</slf4j .version>
114120 <janino .version>3.1.12</janino .version>
115121 <logstash .version>8.0</logstash .version>
116122 </properties >
117123
118- </project >
124+ </project >
Original file line number Diff line number Diff line change @@ -47,20 +47,4 @@ public void whenSystemPropertyIsPresent_thenReturnFileLogger() throws IOExceptio
4747 String logOutput = FileUtils .readFileToString (new File ("conditional.log" ));
4848 assertTrue (logOutput .contains ("test prod log" ));
4949 }
50-
51- @ Test
52- public void whenMatchedWithEvaluatorFilter_thenReturnFilteredLogs () throws IOException {
53- logger = (Logger ) LoggerFactory .getLogger (ConditionalLoggingUnitTest .class );
54-
55- logger .info ("normal log" );
56- logger .info ("billing details: XXXX" );
57- String normalLog = FileUtils .readFileToString (new File ("conditional.log" ));
58- assertTrue (normalLog .contains ("normal log" ));
59- assertTrue (normalLog .contains ("billing details: XXXX" ));
60-
61- String filteredLog = FileUtils .readFileToString (new File ("filtered.log" ));
62- assertTrue (filteredLog .contains ("test prod log" ));
63- assertFalse (filteredLog .contains ("billing details: XXXX" ));
64- }
65-
6650}
You can’t perform that action at this time.
0 commit comments