Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-12 Thread Ralph Goers
Gary, this really doesn’t make sense. Now If I do: MapMessage msg = new MapMessage<>(); msg.with(“count”, 5); msg.with(“amount”, 1.01); msg.with(“text”, “Hello”); Map map = msg.getData(); I am going to get back a Map where all the values are Strings because getData() has cast them to Strings wh

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-12 Thread Gary Gregory
On Fri, Jan 12, 2018 at 10:47 AM, Gary Gregory wrote: > On Fri, Jan 12, 2018 at 12:33 AM, Ralph Goers > wrote: > >> Then I don’t understand why you modified MapMessage to be >> >> public class MapMessage, V> >> and the getData method returns has the signature >> >> public Map getData() >> >> If

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-12 Thread Gary Gregory
On Fri, Jan 12, 2018 at 12:33 AM, Ralph Goers wrote: > Then I don’t understand why you modified MapMessage to be > > public class MapMessage, V> > and the getData method returns has the signature > > public Map getData() > > If you are putting arbitrary stuff in the Map then this signature is wro

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Ralph Goers
Then I don’t understand why you modified MapMessage to be public class MapMessage, V> and the getData method returns has the signature public Map getData() If you are putting arbitrary stuff in the Map then this signature is wrong. Ralph > On Jan 11, 2018, at 11:29 PM, Gary Gregory wrote: >

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Gary Gregory
Hi Ralph, I will have to look at the generics in the morning but my requirement from day one is that a MapMessage allow values of any type (String keys are fine.) where each value in a MapMessage can be of a different types. A specific Appender can decide what to do with the values. Having all Str

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Ralph Goers
In looking at the history MapMessage only supported Strings until you modified it last June. It appears to me you did it incorrectly. You made MapMessage generic but left the put and putAll methods as only supporting String values. I am not sure why you would have done that instead of having the

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Gary Gregory
I can use one of the with() methods so no big deal. Gary On Thu, Jan 11, 2018 at 4:23 PM, Ralph Goers wrote: > I will have to look but as I recall I did that for a reason. > > Sent from my iPhone > > > On Jan 11, 2018, at 3:37 PM, Gary Gregory > wrote: > > > > It seems to me that: > > > > org.

Re: [log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Ralph Goers
I will have to look but as I recall I did that for a reason. Sent from my iPhone > On Jan 11, 2018, at 3:37 PM, Gary Gregory wrote: > > It seems to me that: > > org.apache.logging.log4j.message.MapMessage.put(String, String) > > should really be: > > org.apache.logging.log4j.message.MapMessa

[log4j] org.apache.logging.log4j.message.MapMessage.put(String, String)

2018-01-11 Thread Gary Gregory
It seems to me that: org.apache.logging.log4j.message.MapMessage.put(String, String) should really be: org.apache.logging.log4j.message.MapMessage.put(String, Object) Thoughts? Gary