carterkozak commented on a change in pull request #641:
URL: https://github.com/apache/logging-log4j2/pull/641#discussion_r771879643



##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginBuilder.java
##########
@@ -180,7 +181,9 @@ private void injectFields(final Builder<?> builder) throws 
IllegalAccessExceptio
                     final Object value = visitor.setAliases(aliases)
                         .setAnnotation(a)
                         .setConversionType(field.getType())
-                        .setStrSubstitutor(configuration.getStrSubstitutor())
+                        .setStrSubstitutor(event == null
+                                ? new 
ConfigurationStrSubstitutor(configuration.getStrSubstitutor())
+                                : configuration.getStrSubstitutor())

Review comment:
       manual edit

##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/PluginBuilder.java
##########
@@ -253,7 +256,9 @@ private static Method findFactoryMethod(final Class<?> 
clazz) {
                     final Object value = visitor.setAliases(aliases)
                         .setAnnotation(a)
                         .setConversionType(types[i])
-                        .setStrSubstitutor(configuration.getStrSubstitutor())
+                        .setStrSubstitutor(event == null
+                                ? new 
ConfigurationStrSubstitutor(configuration.getStrSubstitutor())
+                                : configuration.getStrSubstitutor())

Review comment:
       here as well




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to