Skip to content

Commit 125fbb9

Browse files
authored
Fix getLogger() incompatibility in log4j-1.2-api (#3030)
1 parent ad02e57 commit 125fbb9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

log4j-1.2-api/src/main/java/org/apache/log4j/Logger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class Logger extends Category {
3030
*/
3131
private static final String FQCN = Logger.class.getName();
3232

33-
public static Logger getLogger(final Class<?> clazz) {
33+
public static Logger getLogger(@SuppressWarnings("rawtypes") final Class clazz) {
3434
// Depth 2 gets the call site of this method.
3535
return LogManager.getLogger(clazz.getName(), StackLocatorUtil.getCallerClassLoader(2));
3636
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="https://logging.apache.org/xml/ns"
4+
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
5+
type="fixed">
6+
<issue id="3030" link="https://github.com/apache/logging-log4j2/pull/3030"/>
7+
<description format="asciidoc">Fix `getLogger()` source incompatibility in Log4j 1 to Log4j 2 API Bridge (i.e., `log4j-1.2-api`)</description>
8+
</entry>

0 commit comments

Comments
 (0)