[slf4j-dev] [JIRA] Updates for SLF4J-371: Support the lambda expression in the Logger
QOS.CH (JIRA)
noreply-jira at qos.ch
Thu Nov 10 19:03:00 CET 2022
SLF4J / SLF4J-371 [Resolved]
Support the lambda expression in the Logger
==============================
Here's what changed in this issue in the last few minutes.
There is 1 comment.
View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-371
==============================
1 comment
------------------------------
Ondrej Zizka on 10/Nov/22 6:48 PM
Hi, I'm late to the heated debate.
I want to improve performance and relieve the app of the computation of the params to log calls, while keeping the code minimal. I.e. I prefer not to introduce fluent.
1) Does SLF4J support such simplest lambdas (this is a Kotlin syntax):
{code:java}
log.debug { "Foo ${bar.expensiveCall()}" }
{code}
Just so, no format, no additinal calls to fluent wrappers. Note: Kotlin can pass a lambda as both Callable or Supplier params.
2) If yes: Is it natively? Since 2.x?
3) I'm on 1.7.36. 1.7.x is not getting that in any way? 2.x would require migration which I did not figure out on the first try.
4) If not: Is there a plan for that? And is there a 3rd party project allowing that?
Thanks!
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the slf4j-dev
mailing list