Skip to content

Commit 5d989b6

Browse files
committed
Add constants to mark global resource usage
1 parent 09821aa commit 5d989b6

File tree

1 file changed

+29
-4
lines changed
  • log4j-api-test/src/main/java/org/apache/logging/log4j/test/junit

1 file changed

+29
-4
lines changed

log4j-api-test/src/main/java/org/apache/logging/log4j/test/junit/Resources.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,36 @@
2020

2121
/**
2222
* Constants to use the {@link ResourceLock} annotation.
23-
*
2423
*/
25-
public class Resources {
24+
public final class Resources {
25+
26+
/**
27+
* Marks tests that require access to {@link org.apache.logging.log4j.LogManager} methods or change its
28+
* underlying {@link org.apache.logging.log4j.spi.LoggerContextFactory} implementation.
29+
*/
30+
public static final String LOG_MANAGER = "log4j.LogManager";
31+
32+
/**
33+
* Marks tests that require access to {@link org.apache.logging.log4j.ThreadContext} methods or change its
34+
* underlying {@link org.apache.logging.log4j.spi.ThreadContextMap} implementation.
35+
*/
36+
public static final String THREAD_CONTEXT = "log4j.ThreadContext";
37+
38+
/**
39+
* Marks tests that require access to {@link org.apache.logging.log4j.MarkerManager} methods.
40+
*/
41+
public static final String MARKER_MANAGER = "log4j.MarkerManager";
42+
43+
/**
44+
* Marks tests that requires access to {@link org.apache.logging.log4j.Level} static methods to create new levels.
45+
*/
46+
public static final String LEVEL = "log4j.Level";
2647

27-
public static final String THREAD_CONTEXT = "log4j2.ThreadContext";
48+
/**
49+
* Marks tests that require access to {@link org.apache.logging.log4j.status.StatusLogger} static methods or
50+
* change its underlying implementation.
51+
*/
52+
public static final String STATUS_LOGGER = "log4j.StatusLogger";
2853

29-
public static final String MARKER_MANAGER = "log4j2.MarkerManager";
54+
private Resources() {}
3055
}

0 commit comments

Comments
 (0)