You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2019/06/18 04:48:40 UTC

[logging-log4j2] branch master updated: LOG4J2-1143 - Lookups were not found if the plugin key was not lowercase

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4f85741  LOG4J2-1143 - Lookups were not found if the plugin key was not lowercase
4f85741 is described below

commit 4f857419ddc63ea3d6b208139745900f3c50db0e
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Mon Jun 17 21:48:28 2019 -0700

    LOG4J2-1143 - Lookups were not found if the plugin key was not lowercase
---
 .../main/java/org/apache/logging/log4j/core/lookup/Interpolator.java   | 2 +-
 src/changes/changes.xml                                                | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
index c57bdc8..854a762 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
@@ -73,7 +73,7 @@ public class Interpolator extends AbstractConfigurationAwareLookup {
         for (final Map.Entry<String, PluginType<?>> entry : plugins.entrySet()) {
             try {
                 final Class<? extends StrLookup> clazz = entry.getValue().getPluginClass().asSubclass(StrLookup.class);
-                strLookupMap.put(entry.getKey(), ReflectionUtil.instantiate(clazz));
+                strLookupMap.put(entry.getKey().toLowerCase(), ReflectionUtil.instantiate(clazz));
             } catch (final Throwable t) {
                 handleError(entry.getKey(), t);
             }
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 60f782f..c550a36 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -142,6 +142,9 @@
       </action>
     </release>
     <release version="2.12.0" date="2019-MM-DD" description="GA Release 2.12.0">
+      <action issue="LOG4J2-1143" dev="rgoers" type="fix" due-to="Pascal Heinrich">
+        Lookups were not found if the plugin key was not lowercase.
+      </action>
       <action issue="LOG4J2-2406" dev="rgoers" type="add">
         Add reconfiguration methods to Configurator.
       </action>