This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch jee-deletion
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/jee-deletion by this push:
     new 80655eda27 Restore `log4j2-mutableFilter.xml`
80655eda27 is described below

commit 80655eda27c17f900dcce15288e4dfb9c8c149f2
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Tue Nov 21 10:51:41 2023 +0100

    Restore `log4j2-mutableFilter.xml`
---
 .../filter/MutableThreadContextMapFilterTest.java  |  2 +-
 .../MutableThreadContextMapFilterTest.xml          | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/MutableThreadContextMapFilterTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/MutableThreadContextMapFilterTest.java
index 5597ded98d..72aa2fb76f 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/MutableThreadContextMapFilterTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/filter/MutableThreadContextMapFilterTest.java
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
  */
 public class MutableThreadContextMapFilterTest implements 
MutableThreadContextMapFilter.FilterConfigUpdateListener {
 
-    static final String CONFIG = "log4j2-mutableFilter.xml";
+    static final String CONFIG = "MutableThreadContextMapFilterTest.xml";
     static LoggerContext loggerContext = null;
     static File targetFile = new File("target/test-classes/testConfig.json");
     static Path target = targetFile.toPath();
diff --git 
a/log4j-core-test/src/test/resources/MutableThreadContextMapFilterTest.xml 
b/log4j-core-test/src/test/resources/MutableThreadContextMapFilterTest.xml
new file mode 100644
index 0000000000..4a39683016
--- /dev/null
+++ b/log4j-core-test/src/test/resources/MutableThreadContextMapFilterTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to you under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<Configuration name="ConfigTest" status="ERROR">
+  <MutableThreadContextMapFilter configLocation="${sys:configLocation}" 
pollInterval="1" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
+  <Appenders>
+    <Console name="STDOUT">
+      <PatternLayout pattern="%m%n"/>
+    </Console>
+    <List name="List">
+    </List>
+  </Appenders>
+  <Loggers>
+    <Logger name="Test" level="error">
+      <AppenderRef ref="List"/>
+    </Logger>
+    <Root level="error">
+      <AppenderRef ref="STDOUT"/>
+    </Root>
+  </Loggers>
+</Configuration>

Reply via email to