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

   ## Description
   
   According to the 
[doumentation](https://logging.apache.org/log4j/3.x/manual/configuration.html), 
Log4j will inspect the `"log4j.configurationFile"` system property and, if set, 
will attempt to load the configuration using the `ConfigurationFactory` that 
matches the file extension. In version `2.x` this property was named 
`"log4j2.configurationFile"`. Either way, Log4j seems to ignore this system 
property. Instead it is sensitive to a system property names 
`"log4j2.*.Configuration.file"`.
   
   Is this a documentation issue only? How should this be used in version 
`3.x`? Why case sensitive `Configuration`?
   
   ## Configuration
   
   **Version:** 3.0.0-beta2
   
   **Operating system:** 5.15.133.1-microsoft-standard-WSL2 #1 SMP x86_64 
GNU/Linux
   
   **JDK:** openjdk 17.0.9 2023-10-17
   
   ## Logs
   In addition to above described issue, loading a YAML configuration works 
with version `3.0.0-beta1` but fails with `3.0.0-beta2`:
   ```
   [Fatal Error] log4j2.yml:1:1: Content is not allowed in prolog.
   ERROR StatusLogger Error parsing /config/log4j2.yml
    org.xml.sax.SAXParseException; systemId: file:///config/log4j2.yml; 
lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
           at 
java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:262)
           at 
java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:342)
           at 
org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:88)
   ```
   Apparently with the latest version a `XmlConfiguration` object is created 
even if the file extension is `yml`.


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