[ https://issues.apache.org/jira/browse/LOG4J2-1418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15324515#comment-15324515 ]
Remko Popma edited comment on LOG4J2-1418 at 6/10/16 2:29 PM: -------------------------------------------------------------- Code looks good. Shall we add some more text to the javadoc for the method? Something like {quote} Since version 2.6, Log4j internally uses message factories that implement the \{@link MessageFactory2} interface. From version 2.6.2, the return type of this method was changed from \{@link MessageFactory} to \{@code <MF extends MessagFactory> MF}. The returned factory will always implement \{@code MessageFactory2}, but the return type of this method could not be changed to \{@code MessageFactory2} without breaking binary compatibility. {quote} was (Author: rem...@yahoo.com): Code looks good. Shall we add some more text to the javadoc for the method? Something like {quote} Since version 2.6, Log4j internally uses message factories that implement the \{@link MessageFactory2} interface. From version 2.6.2, the return type of this method was changed from \{@link MessageFactory} to \{@code <MF extends MessagFactory> MF}, because changing the return type to \{@code MessageFactory2} would break binary compatibility. {quote} > 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, 2.6.1 > Reporter: Mikael Ståldal > Assignee: Mikael Ståldal > Fix For: 2.6.2 > > > 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: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org