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



##########
File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/PropertiesLookup.java
##########
@@ -29,29 +32,28 @@
  */
 public final class PropertiesLookup implements StrLookup {
 
-    /**
-     * Configuration from which to read properties.
-     */
-    private final Map<String, String> properties;
+    /** Logger context properties. */
+    private final Map<String, String> contextProperties;
 
-    /**
-     * Constructs a new instance for the given map.
-     *
-     * @param properties map these.
-     */
-    public PropertiesLookup(final Map<String, String> properties) {
-        this.properties = properties == null
+    /** Configuration properties. */
+    private final Map<String, ConfigurationPropertyResult> 
configurationProperties;
+
+    public PropertiesLookup(final Property[] configProperties, final 
Map<String, String> contextProperties) {
+        this.contextProperties = contextProperties == null
                 ? Collections.emptyMap()
-                : properties;
+                : contextProperties;
+        this.configurationProperties = configProperties == null
+                ? Collections.emptyMap()
+                : createConfigurationPropertyMap(configProperties);
     }
 
     /**
-     * Gets the property map.
+     * Constructs a new instance for the given map.
      *
-     * @return the property map.
+     * @param properties map these.
      */
-    public Map<String, String> getProperties() {

Review comment:
       @garydgregory This removes the properties getter as it's not clear how 
the internal state would be reflected by such a getter. In general I prefer to 
avoid exposing internal state so that it remains an implementation detail, not 
API, but I don't want to break any functionality that you rely upon.




-- 
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