File tree Expand file tree Collapse file tree 5 files changed +33
-14
lines changed
main/java/org/apache/logging/slf4j
test/java/org/apache/logging/slf4j Expand file tree Collapse file tree 5 files changed +33
-14
lines changed Original file line number Diff line number Diff line change 32
32
<!--
33
33
~ OSGi and JPMS options
34
34
-->
35
- <slf4j .support.bound>3 </slf4j .support.bound >
35
+ <slf4j .support.range>[1.7,3) </slf4j .support.range >
36
36
<bnd-extra-package-options >
37
37
<!-- This bridge also support SLF4J 2.x -->
38
- org.slf4j.*;version="${range;[==,${ slf4j.support.bound} ) }"
38
+ org.slf4j.*;version="${slf4j.support.range } "
39
39
</bnd-extra-package-options >
40
+ <bnd-extra-module-options >
41
+ <!-- The module descriptor is in `META-INF/versions/9`
42
+ BND 6.x can not find it -->
43
+ org.slf4j;substitute="slf4j-api"
44
+ </bnd-extra-module-options >
40
45
</properties >
41
46
<dependencies >
42
47
<dependency >
95
100
</dependency >
96
101
</dependencies >
97
102
103
+ <build >
104
+ <plugins >
105
+ <!--
106
+ ~ Unban Logback.
107
+ -->
108
+ <plugin >
109
+ <groupId >org.apache.maven.plugins</groupId >
110
+ <artifactId >maven-enforcer-plugin</artifactId >
111
+ <executions >
112
+ <execution >
113
+ <id >ban-logging-dependencies</id >
114
+ <configuration >
115
+ <rules >
116
+ <bannedDependencies >
117
+ <includes >
118
+ <include >ch.qos.logback:*:*:*:test</include >
119
+ </includes >
120
+ </bannedDependencies >
121
+ </rules >
122
+ </configuration >
123
+ </execution >
124
+ </executions >
125
+ </plugin >
126
+ </plugins >
127
+ </build >
98
128
</project >
Original file line number Diff line number Diff line change 29
29
import org .slf4j .MarkerFactory ;
30
30
import org .slf4j .spi .LocationAwareLogger ;
31
31
32
- /**
33
- *
34
- */
35
32
public class SLF4JLogger extends AbstractLogger {
36
33
37
34
/**
Original file line number Diff line number Diff line change 22
22
import org .apache .logging .log4j .spi .LoggerRegistry ;
23
23
import org .slf4j .LoggerFactory ;
24
24
25
- /**
26
- *
27
- */
28
25
public class SLF4JLoggerContext implements LoggerContext {
29
26
private final LoggerRegistry <ExtendedLogger > loggerRegistry = new LoggerRegistry <>();
30
27
Original file line number Diff line number Diff line change 22
22
import org .apache .logging .log4j .status .StatusLogger ;
23
23
import org .apache .logging .log4j .util .LoaderUtil ;
24
24
25
- /**
26
- *
27
- */
28
25
public class SLF4JLoggerContextFactory implements LoggerContextFactory {
29
26
private static final StatusLogger LOGGER = StatusLogger .getLogger ();
30
27
private static final LoggerContext context = new SLF4JLoggerContext ();
Original file line number Diff line number Diff line change 16
16
*/
17
17
package org .apache .logging .slf4j ;
18
18
19
- import static org .hamcrest .MatcherAssert .assertThat ;
20
19
import static org .hamcrest .Matchers .*;
21
20
import static org .junit .Assert .*;
22
21
43
42
@ LoggerContextSource
44
43
public class LoggerTest {
45
44
46
- private static final String STRING = "String" ;
47
45
// Log4j objects
48
46
private Logger logger ;
49
47
// Logback objects
@@ -72,7 +70,7 @@ public void basicFlow() {
72
70
73
71
@ Test
74
72
public void simpleFlow () {
75
- logger .traceEntry (STRING );
73
+ logger .traceEntry ("foo" );
76
74
logger .traceExit (0 );
77
75
assertThat (list .strList , hasSize (2 ));
78
76
}
You can’t perform that action at this time.
0 commit comments