You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/06/09 00:03:18 UTC

[jira] [Commented] (LOG4J2-1935) Add with(String, primitive) methods to org.apache.logging.log4j.message.MapMessage

    [ https://issues.apache.org/jira/browse/LOG4J2-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043686#comment-16043686 ] 

ASF subversion and git services commented on LOG4J2-1935:
---------------------------------------------------------

Commit 76aff58919dc5030367ea24c7c8ef42dca3b75cd in logging-log4j2's branch refs/heads/master from [~garydgregory]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=76aff58 ]

[LOG4J2-1935] Add with(String, primitive) methods to
org.apache.logging.log4j.message.MapMessage. Build passes with 'mvn
clean install' but I had to @Ignore HttpAppenderTest locally because it
randomly fails.

> Add with(String, primitive) methods to org.apache.logging.log4j.message.MapMessage
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-1935
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1935
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>
> Add with() methods for primitives and Object:
> - with(String, boolean)
> - with(String, byte)
> - with(String, char)
> - with(String, double)
> - with(String, float)
> - with(String, int)
> - with(String, long)
> - with(String, Object)
> - with(String, short)
> This one already exists:
> - with(String, String)
> This parallels what you can do with a JMS {{MapMessage}}.
> The following {{protected}} methods have also been added:
> - validate(String, boolean)
> - validate(String, byte)
> - validate(String, char)
> - validate(String, double)
> - validate(String, float)
> - validate(String, int)
> - validate(String, long)
> - validate(String, Object)
> - validate(String, short)
> The method {{validate(String, String)}} already exists.
> In 2.8.2, MapMessage managed a Map<String, String>. 
> In 2.9: 
> - MapMessage is now declared with generics to define what kind of values are managed.
> - The new Subclass StringMapMessage is typed specifically to deal with String values.
> The StringMapMessage class does not perform any type conversion or checks.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)