You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2020/09/17 19:01:37 UTC
[logging-log4j2] branch release-2.x updated: Specify resource lock
for status logger extension
This is an automated email from the ASF dual-hosted git repository.
mattsicker pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new 4e4ed70 Specify resource lock for status logger extension
4e4ed70 is described below
commit 4e4ed70b01af6161b83664b8628edbab579cccf5
Author: Matt Sicker <bo...@gmail.com>
AuthorDate: Thu Sep 17 14:01:01 2020 -0500
Specify resource lock for status logger extension
Signed-off-by: Matt Sicker <bo...@gmail.com>
---
.../src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java | 3 ++-
.../test/java/org/apache/logging/log4j/junit/StatusLoggerLevel.java | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java b/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
index 038a602..bdce79d 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/AbstractLoggerTest.java
@@ -39,7 +39,6 @@ import static org.junit.jupiter.api.Assertions.*;
@StatusLoggerLevel("WARN")
@ResourceLock("log4j2.MarkerManager")
-@ResourceLock("log4j2.StatusLogger")
public class AbstractLoggerTest {
private static final StringBuilder CHAR_SEQ = new StringBuilder("CharSeq");
@@ -892,6 +891,7 @@ public class AbstractLoggerTest {
}
@Test
+ @ResourceLock("log4j2.StatusLogger")
public void testMessageThrows() {
final ThrowableExpectingLogger logger = new ThrowableExpectingLogger(false);
logger.error(new TestMessage(() -> {
@@ -906,6 +906,7 @@ public class AbstractLoggerTest {
}
@Test
+ @ResourceLock("log4j2.StatusLogger")
public void testMessageThrowsAndNullFormat() {
final ThrowableExpectingLogger logger = new ThrowableExpectingLogger(false);
logger.error(new TestMessage(() -> {
diff --git a/log4j-api/src/test/java/org/apache/logging/log4j/junit/StatusLoggerLevel.java b/log4j-api/src/test/java/org/apache/logging/log4j/junit/StatusLoggerLevel.java
index 9edf7b0..ef36d97 100644
--- a/log4j-api/src/test/java/org/apache/logging/log4j/junit/StatusLoggerLevel.java
+++ b/log4j-api/src/test/java/org/apache/logging/log4j/junit/StatusLoggerLevel.java
@@ -18,6 +18,7 @@
package org.apache.logging.log4j.junit;
import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.parallel.ResourceLock;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
@@ -36,6 +37,7 @@ import java.lang.annotation.Target;
@Documented
@Inherited
@ExtendWith(StatusLoggerLevelExtension.class)
+@ResourceLock("log4j2.StatusLogger")
public @interface StatusLoggerLevel {
/** Name of {@link org.apache.logging.log4j.Level} to use for status logger. */
String value();