You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2024/06/06 12:05:59 UTC

(commons-jcs) branch master updated: Try to handle Github complaints in dead module

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

tv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git


The following commit(s) were added to refs/heads/master by this push:
     new 9676019d Try to handle Github complaints in dead module
9676019d is described below

commit 9676019dc80fd9357a198a67972d5da4398ca347
Author: Thomas Vandahl <tv...@apache.org>
AuthorDate: Thu Jun 6 14:05:52 2024 +0200

    Try to handle Github complaints in dead module
---
 commons-jcs3-sandbox/commons-jcs3-yajcache/pom.xml |  6 +--
 .../src/test/resources/log4j.xml                   | 50 ----------------------
 .../src/test/resources/log4j2.xml                  | 34 +++++++++++++++
 3 files changed, 37 insertions(+), 53 deletions(-)

diff --git a/commons-jcs3-sandbox/commons-jcs3-yajcache/pom.xml b/commons-jcs3-sandbox/commons-jcs3-yajcache/pom.xml
index 401e1cde..59d1bc0c 100644
--- a/commons-jcs3-sandbox/commons-jcs3-yajcache/pom.xml
+++ b/commons-jcs3-sandbox/commons-jcs3-yajcache/pom.xml
@@ -48,9 +48,9 @@
       <version>1.3.0</version>
     </dependency>
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>1.2.17</version>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-core</artifactId>
+      <version>${commons.log4j.version}</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
diff --git a/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j.xml b/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j.xml
deleted file mode 100644
index 4a0e005d..00000000
--- a/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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.
--->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-	<appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
-		<appender-ref ref="CONSOLE"/>
-    <!--appender-ref ref="FILE"/-->
-	</appender>
-
-	<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-		<layout class="org.apache.log4j.PatternLayout">
-  		     <param name="ConversionPattern"
-					value="[%d{dd/MM hh:mm:ss}] %5p %c{2}: %m%n" />
-		</layout>
-	</appender>
-
-	<appender name="FILE" class="org.apache.log4j.RollingFileAppender">
-		<param name="File" value="/tmp/yajcache.log4j.log"/>
-		<param name="MaxFileSize" value="1MB"/>
-		<param name="MaxBackupIndex" value="100"/>
-		<layout class="org.apache.log4j.PatternLayout">
-  		     <param name="ConversionPattern"
-					value="[%d{dd/MM/yy hh:mm:ss:sss}] %5p %c{2}: %m%n" />
-		</layout>
-	</appender>
-
-	<root>
-		<priority value="debug"/>
-		<appender-ref ref="CONSOLE"/>
-		<!--appender-ref ref="ASYNC"/-->
-	</root>
-</log4j:configuration>
diff --git a/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j2.xml b/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j2.xml
new file mode 100644
index 00000000..2fc4facb
--- /dev/null
+++ b/commons-jcs3-sandbox/commons-jcs3-yajcache/src/test/resources/log4j2.xml
@@ -0,0 +1,34 @@
+<?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 status="WARN">
+    <Appenders>
+        <File name="jcs" fileName="target/jcs-test.log">
+            <PatternLayout pattern="%d [%t] %-5p %c - %m%n" />
+        </File>
+    </Appenders>
+    <Loggers>
+        <Logger name="org.apache.commons.jcs" additivity="false" level="INFO">
+            <AppenderRef ref="jcs"/>
+        </Logger> 
+        <Root level="ERROR"><!-- log4j 1.2 has DEBUG -->
+            <AppenderRef ref="jcs" />
+        </Root>
+    </Loggers>
+</Configuration>
\ No newline at end of file