[
https://issues.apache.org/jira/browse/LOG4J2-1280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15152456#comment-15152456
]
Remko Popma commented on LOG4J2-1280:
-------------------------------------
I believe the MessageSupplier interface can now be deprecated.
With this change, users can use Supplier<Message> instead and get the same
behaviour.
> Logger methods taking Supplier<?> parameters should check if supplied value
> is Message
> --------------------------------------------------------------------------------------
>
> Key: LOG4J2-1280
> URL: https://issues.apache.org/jira/browse/LOG4J2-1280
> Project: Log4j 2
> Issue Type: Bug
> Components: API
> Affects Versions: 2.5
> Reporter: Remko Popma
> Assignee: Remko Popma
> Fix For: 2.6
>
>
> Methods on the Logger interface that take a Supplier<?> argument currently do
> not correctly handle the case where the supplied value is of type Message.
> Currently, either the Message value will be wrapped in an ObjectMessage, or
> it will be used as one of the parameter values in a parameterized text
> message. In both cases, the result of Message.toString() will eventually be
> logged, rather than Message.getFormattedString().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]