MLausberg opened a new issue, #1741: URL: https://github.com/apache/logging-log4j2/issues/1741
## Description We created an application based on Eclipse 2023-06 (4.28). The very first time we start the application the log4j2 logic is initialized correctly and we can see log messages. But after closing the application the following start commands will not initialize log4j2 correctly and fail. No exyception is shown and no log messages are created anymore. From second time on, log4j is using a default implementation for all logger variables. it seems that the services which provide Environment variable information are not registeed correctly when initializing/calling org.apache.logging.log4j.util.PropertiesUtil$Environment ``` sources.add(propertySource); // We don't log anything on the status logger. ServiceLoaderUtil.loadServices(PropertySource.class, MethodHandles.lookup(), false, false).forEach(sources::add); ``` While initializing log4j2, the System properties are not available and thats why our *.xml is not fetched _-Dlog4j2.debug=true -DLog4jContextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.configurationFile=file:log4j2.xml_ ## Configuration **Version:** [Log4j version] org.apache.logging.log4j.1.2-api_2.20.0 org.apache.logging.log4j.api_2.20.0 org.apache.logging.log4j.core_2.20.0 org.apache.logging.log4j.jcl_2.20.0 org.apache.logging.log4j.slf4j-impl_2.20.0 **Operating system:** [OS and version] org.osgi.framework.os.name = Windows10 osgi.ws = win32 sun.arch.data.model = 64 **JDK:** [JDK distribution and version] Eclipse Adoptium Temurin-17.0.8+7 ## Logs Can not provide any logs, because they ar emissing. We assume a plugin loading order issue or a service registration problem. ## Reproduction -- 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]
