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 24
24
<artifactId >logback-classic</artifactId >
25
25
<version >${logback.version} </version >
26
26
</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 >
27
33
<dependency >
28
34
<groupId >ch.qos.logback.contrib</groupId >
29
35
<artifactId >logback-json-classic</artifactId >
109
115
<docx4j .version>3.3.5</docx4j .version>
110
116
<angus .mail.version>2.0.1</angus .mail.version>
111
117
<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>
113
119
<slf4j .version>2.1.0-alpha1</slf4j .version>
114
120
<janino .version>3.1.12</janino .version>
115
121
<logstash .version>8.0</logstash .version>
116
122
</properties >
117
123
118
- </project >
124
+ </project >
Original file line number Diff line number Diff line change @@ -47,20 +47,4 @@ public void whenSystemPropertyIsPresent_thenReturnFileLogger() throws IOExceptio
47
47
String logOutput = FileUtils .readFileToString (new File ("conditional.log" ));
48
48
assertTrue (logOutput .contains ("test prod log" ));
49
49
}
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
-
66
50
}
You can’t perform that action at this time.
0 commit comments