Hi All

There's a couple of suggestions I'd like to run past the group to see if
there's any thoughts / potential issues.

The first is: updating to SLF4J 2.x API and JUL implementation
(specifically 2.0.9) in TomEE. There's a couple of rationale here:

- The 1.x branch of SLF4J is no longer maintained
- At least one of the bindings (Logback) requires a SLF4J 2.x API for
Jakarta EE support

Secondly, thanks to this bit of code in the class loader:
https://github.com/apache/tomee/blob/main/container/openejb-core/src/main/java/org/apache/openejb/util/classloader/URLClassLoaderFirst.java#L600-L619,
it is possible for a webapp to include its own SLF4J API and binding in its
WEB-INF/lib to use its own logging config. With SLF4J 2.x,
org/slf4j/impl/StaticLoggerBinder.class is not included with the binders,
nor is it called, so shouldSkipSlf4j() returns true, even when SLF4J and a
binder is present in the web app. Simply removing this method, and the
single place it is called seems to enable the web app to do its own logging
with its own binder.

I've run a TCK build with both of these changes present, and it looks ok.
Does anyone have any feedback with respect to these proposals? Is anyone
out there using SLF4J in their applications with these versions of TomEE
who would be impacted?

Thanks

Jon

Reply via email to