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

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


The following commit(s) were added to refs/heads/2.x by this push:
     new 125fbb90f2 Fix `getLogger()` incompatibility in `log4j-1.2-api` (#3030)
125fbb90f2 is described below

commit 125fbb90f2f4f57390eac64e207228e2a5cd15dd
Author: taichi <[email protected]>
AuthorDate: Tue Oct 1 20:22:16 2024 +0900

    Fix `getLogger()` incompatibility in `log4j-1.2-api` (#3030)
---
 log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java | 2 +-
 src/changelog/.2.x.x/3030_fix_log4j1_getLogger.xml       | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java 
b/log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java
index a9467c9448..aa15d237cf 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java
@@ -30,7 +30,7 @@ public class Logger extends Category {
      */
     private static final String FQCN = Logger.class.getName();
 
-    public static Logger getLogger(final Class<?> clazz) {
+    public static Logger getLogger(@SuppressWarnings("rawtypes") final Class 
clazz) {
         // Depth 2 gets the call site of this method.
         return LogManager.getLogger(clazz.getName(), 
StackLocatorUtil.getCallerClassLoader(2));
     }
diff --git a/src/changelog/.2.x.x/3030_fix_log4j1_getLogger.xml 
b/src/changelog/.2.x.x/3030_fix_log4j1_getLogger.xml
new file mode 100644
index 0000000000..b803b7f45e
--- /dev/null
+++ b/src/changelog/.2.x.x/3030_fix_log4j1_getLogger.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="https://logging.apache.org/xml/ns";
+       xsi:schemaLocation="https://logging.apache.org/xml/ns 
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd";
+       type="fixed">
+  <issue id="3030" link="https://github.com/apache/logging-log4j2/pull/3030"/>
+  <description format="asciidoc">Fix `getLogger()` source incompatibility in 
Log4j 1 to Log4j 2 API Bridge (i.e., `log4j-1.2-api`)</description>
+</entry>

Reply via email to