[slf4j-dev] [JIRA] Updates for SLF4J-526: Idea for fluent API improvement

QOS.CH (JIRA) noreply-jira at qos.ch
Wed Feb 2 13:07:00 CET 2022


SLF4J / SLF4J-526 [Open]
Idea for fluent API improvement

==============================

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

==============================
 1 comment
------------------------------

Adrian Shum on 02/Feb/22 12:53 PM
Hi Ceki,

I have raised a new PR to demonstrate the idea of using lambda to set up the logging event.

Some slight refactoring on LoggingEventBuilder has been done too to better separate the responsibility of Fluent API and Fluent Builder, which should highly reduce inappropriate method call that you might be in concern, e.g. calling log(...) in the lambda; calling setMessage() (which cause log() be forgotten) during fluent API call.

There should be more code cleanup needed (e.g. method name of "makeLoggingEventBuilder()" etc) but you may take a look if this direction is something valuable to proceed and I can help further work on it if you don't mind.


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



More information about the slf4j-dev mailing list