[
https://issues.apache.org/jira/browse/LOG4J2-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321691#comment-15321691
]
Remko Popma edited comment on LOG4J2-1418 at 6/9/16 12:23 AM:
--------------------------------------------------------------
That log method is for internal Log4j logging to the StatusLogger. I did not
consider status messages part of steady-state logging and made no effort to
make it garbage-free. I am not too worried about this.
Since people may have implemented the {{MessageFactory}} interface without
extending {{AbstractMessageFactory}} we cannot add methods to the
{{MessageFactory}} interface without breaking binary compatibility.
Is it not enough to have a protected method {{getMessageFactory2()}} on
AbstractLogger?
was (Author: [email protected]):
That log method is for the StatusLogger. I did not consider status messages
part of steady-state logging and made no effort to make it garbage-free. I am
not too worried about this.
Since people may have implemented the {{MessageFactory}} interface without
extending {{AbstractMessageFactory}} we cannot add methods to the
{{MessageFactory}} interface without breaking binary compatibility.
Is it not enough to have a protected method {{getMessageFactory2()}} on
AbstractLogger?
> Provide MessageFactory2 to custom Logger implementations
> --------------------------------------------------------
>
> Key: LOG4J2-1418
> URL: https://issues.apache.org/jira/browse/LOG4J2-1418
> Project: Log4j 2
> Issue Type: Improvement
> Components: API
> Affects Versions: 2.6
> Reporter: Mikael Ståldal
>
> It would be useful for a custom Logger implementation to be able to get hold
> of a {{MessageFactory2}} (and not just a {{MessageFactory}}), in order to
> efficiently process {{CharSequence}} etc.
> {{Logger.getMessageFactory()}} return {{MessageFactory}}, even though the
> sole implementation in {{AbstractLogger}} do have a {{MessageFactory2}}
> available.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]