Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Log4j v1 support completely, even with log4j-1.2-api bridge #11925

Merged
merged 1 commit into from Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions common/pom.xml
Expand Up @@ -63,11 +63,6 @@
<artifactId>commons-logging</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
Expand Down
Expand Up @@ -49,11 +49,6 @@ private static InternalLoggerFactory newDefaultFactory(String name) {
return f;
}

f = useLog4JLoggerFactory(name);
if (f != null) {
return f;
}

return useJdkLoggerFactory(name);
}

Expand Down Expand Up @@ -83,19 +78,6 @@ private static InternalLoggerFactory useLog4J2LoggerFactory(String name) {
}
}

private static InternalLoggerFactory useLog4JLoggerFactory(String name) {
try {
InternalLoggerFactory f = Log4JLoggerFactory.INSTANCE;
f.newInstance(name).debug("Using Log4J as the default logging framework");
return f;
} catch (LinkageError ignore) {
return null;
} catch (Exception ignore) {
// We catch Exception and not ReflectiveOperationException as we still support java 6
return null;
}
}

private static InternalLoggerFactory useJdkLoggerFactory(String name) {
InternalLoggerFactory f = JdkLoggerFactory.INSTANCE;
f.newInstance(name).debug("Using java.util.logging as the default logging framework");
Expand Down