[slf4j-dev] [JIRA] Updates for SLF4J-575: Logback-classic 1.4.5 emits replayed events at the TRACE level

QOS.CH (JIRA) noreply-jira at qos.ch
Sat Dec 10 19:21:00 CET 2022


SLF4J / SLF4J-575 [In Progress]
Logback-classic 1.4.5 emits replayed events at the TRACE level

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

Here's what changed in this issue in the last few minutes.

There are 4 comments.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-575

==============================
 4 comments
------------------------------

Ceki Gülcü on 10/Dec/22 7:08 PM
The implementation of the {{Logger.log(LoggingEvent)}} method defined in {{org.slf4j.spi.LoggingEventAware}} changed between logback versions 1.2 and 1.3/1.4. The latter method implementation assumes that when the method is invoked, there was a prior definitive decision made to log the event (with no further need for filtering) whereas the prior implementation assumes that some further filtering was required.

The javadoc for {{org.slf4j.spi.LoggingEventAware}} will be updated to clarify this distinction. Moreover, the {{org.slf4j.LoggerFactory#replaySingleEvent}} method will be modified to perform filtering before calling {{LoggingEventAware.log()}} which should solve the issue described here.

------------------------------

Patrick Doyle on 10/Dec/22 7:11 PM
The unit test for replay doesn't test that the correct filtering hapens.

https://github.com/qos-ch/logback/blob/master/logback-classic/src/test/java/org/slf4j/implTest/MultithreadedInitializationTest.java

------------------------------

Patrick Doyle on 10/Dec/22 7:14 PM
Sounds great @ceki. Is there any way I can help?

 

------------------------------

Patrick Doyle on 10/Dec/22 7:17 PM
Note to self - I see the spot where the change is required [here](https://github.com/qos-ch/slf4j/blob/363f0a534ea736bb02ced129f3ae27720f95c13f/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java#L307).


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



More information about the slf4j-dev mailing list