[
https://issues.jboss.org/browse/LOGTOOL-142?page=com.atlassian.jira.plugi...
]
James Perkins commented on LOGTOOL-142:
---------------------------------------
This would have to likely be supported in JBoss Logging as well. Having be logic in
generated code could increase the memory footprint quite a bit if suppliers are
excessively used. Though it's something to consider so that this won't be blocked
by a logging fix.
Support java.util.function.Supplier as a parameter to logs and
bundles
----------------------------------------------------------------------
Key: LOGTOOL-142
URL:
https://issues.jboss.org/browse/LOGTOOL-142
Project: Log Tool
Issue Type: Enhancement
Affects Versions: 2.2.0.Final
Reporter: Daniel Siviter
Priority: Major
Similar to JDK logging that supports deferred logging using
{{java.util.function.Supplier}}, allow for JBoss logging but for each parameter within a
log and bundle.
e.g.
{code}
@LogMessage
@Message("I'm going to log something computationally expensive: %s")
void expensive(Supplier<String> value);
{code}
Which could then be used as:
{code}
LogInterface.LOG.expensive(this::toExpensiveFormattedString);
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)