[ https://issues.apache.org/jira/browse/LOG4J2-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Remko Popma resolved LOG4J2-1225. --------------------------------- Resolution: Won't Fix Assignee: Remko Popma I remember now why I did it this way: the Logger API has two separate methods: {code} void debug(Supplier<?> objectMessageSupplier); void debug(MessageSupplier messageMessageSupplier); {code} {{Supplier<?>}} is a lambda that returns some object, which the API will wrap in a Message object by calling {{messageFactory.newMessage(supplier.get())}}. {{MessageSupplier.get()}} on the other hand returns a {{Message}} object, so no need to invoke the message factory. It would be confusing if MessageSupplier would extend the Supplier interface, and in fact, I think the wrong overloaded method was called when I tried this. So this is by design. > MessageSupplier should extend Supplier<? extends Message> > --------------------------------------------------------- > > Key: LOG4J2-1225 > URL: https://issues.apache.org/jira/browse/LOG4J2-1225 > Project: Log4j 2 > Issue Type: Improvement > Components: API > Affects Versions: 2.5 > Reporter: Joern Huxhorn > Assignee: Remko Popma > Priority: Trivial > -- 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