[slf4j-dev] [JIRA] Updates for SLF4J-371: Support the lambda expression in the Logger

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Dec 27 17:09:00 CET 2021


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
------------------------------

Alexander Kiselyov on 27/Dec/21 4:57 PM
Just to make things clear: the last listing won't work either - it'll just print the standard {{Object.toString()}} return value ({{ getClass().getName() + '@' + Integer.toHexString(hashCode())}}) :) Reason is, {{Callable}} interface is not the same as {{Supplier}} (though signature is quite similar), and, hence, your resulting anonymous class does not implement it, so {{addArgument(Object)}} will be invoked instead of {{addArgument(Supplier<?>)}}.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list