rgoers commented on code in PR #2419:
URL: https://github.com/apache/logging-log4j2/pull/2419#discussion_r1545166863


##########
log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMapMessage.java:
##########
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.logging.log4j.message;
+
+import java.util.Map;
+
+/**
+ * Class Description goes here.
+ */
+public class ParameterizedMapMessage extends StringMapMessage {
+
+    private static final long serialVersionUID = -7724723101786525409L;
+    private final Message baseMessage;
+
+    ParameterizedMapMessage(Message baseMessage, Map<String, String> 
resourceMap) {
+        super(resourceMap);
+        this.baseMessage = baseMessage;
+    }
+
+    @Override
+    public String getFormattedMessage() {
+        return baseMessage.getFormattedMessage();
+    }

Review Comment:
   @ppkarwasz 
   
   > Due to a "happens before" relationship they didn't have the chance to do 
it. 😁
   They will be able to after this is merged.
   
   > However I would like to have a well documented Java interface that 
ParameterizedMapMessage will implement. In time we can switch all the 
instanceof MapMessage to that class
   Umm. No.  There are multiple reasons to use a MapMessage of various kinds. 
Consider StructuredDataMessage. That supports RFC5414 which specifies how 
things are supposed to behave. I use MapMessages to create data for dashboards 
in Kibana. In that case you don't want or need the ParameterizedMessage support.



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