Skip to content

Commit 3871c4c

Browse files
Remove jvmrunargs lookup (#3892)
Ports #3874 to `main`. # Conflicts: # log4j-core-test/src/test/java/org/apache/logging/log4j/core/lookup/MainInputArgumentsJmxLookupTest.java # log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JmxRuntimeInputArgumentsLookup.java # log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/package-info.java # src/changelog/.3.x.x/3874_remove_jvmrunargs_lookup.xml
1 parent 2fd8bfe commit 3871c4c

File tree

4 files changed

+13
-132
lines changed

4 files changed

+13
-132
lines changed

log4j-core-test/src/test/java/org/apache/logging/log4j/core/lookup/MainInputArgumentsJmxLookupTest.java

Lines changed: 0 additions & 52 deletions
This file was deleted.

log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ public class Interpolator extends AbstractConfigurationAwareLookup implements Lo
4747

4848
private static final String LOOKUP_KEY_JNDI = "jndi";
4949

50-
private static final String LOOKUP_KEY_JVMRUNARGS = "jvmrunargs";
51-
5250
private static final Logger LOGGER = StatusLogger.getLogger();
5351

5452
private final Map<String, Supplier<? extends StrLookup>> strLookups = new ConcurrentHashMap<>();
@@ -79,11 +77,6 @@ private void handleError(final String lookupKey, final Throwable t) {
7977
+ " JNDI string lookups will not be available, continuing configuration. Ignoring "
8078
+ t);
8179
break;
82-
case LOOKUP_KEY_JVMRUNARGS:
83-
// java.lang.VerifyError: org/apache/logging/log4j/core/lookup/JmxRuntimeInputArgumentsLookup
84-
LOGGER.warn("JMX runtime input lookup class is not available because this JRE does not support JMX. "
85-
+ "JMX lookups will not be available, continuing configuration. Ignoring " + t);
86-
break;
8780
case LOOKUP_KEY_WEB:
8881
LOGGER.info(
8982
"Log4j appears to be running in a Servlet environment, but there's no `log4j-jakarta-web` module "

log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/JmxRuntimeInputArgumentsLookup.java

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<entry xmlns="https://logging.apache.org/xml/ns"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="
5+
https://logging.apache.org/xml/ns
6+
https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
7+
type="removed">
8+
<issue id="3874" link="https://github.com/apache/logging-log4j2/pull/3874"/>
9+
10+
<description format="asciidoc">
11+
Remove the `jvmrunargs` lookup.
12+
</description>
13+
</entry>

0 commit comments

Comments
 (0)