jvz opened a new issue, #1977:
URL: https://github.com/apache/logging-log4j2/issues/1977

   Over time, we collected many places in the codebase that accept an override 
by specifying a class name through a system property. These typically worked by 
guessing at an appropriate `ClassLoader` to use to load the class and then 
using reflection to instantiate it. This pattern is problematic in module 
systems like the Java module system and OSGi due to stronger encapsulation 
guarantees. As we've already implemented for plugins, anything else remaining 
that customizes class selection based on system properties should be updated to 
use `java.util.ServiceLoader` (when customizing in log4j-api) or specified in 
bundle classes installed via a service loader (which is also where some of the 
old system properties customizations are currently supported and can be 
simplified).
   
   In general, the goal of this is to eliminate the use of `LoaderUtil::load` 
and any other implicit `ClassLoader` usage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to