title: Log4j2 not working with json config file
body: <p>It seems like log4j is trying to parse .json config file by XML parser, but why?</p>
  
  <p>I set log4j config file by command line argument: </p>
  
  <pre><code>-Dlog4j.configurationFile=src/log4j2.json
  </code></pre>
  
  <p>file content:</p>
  
  <pre><code>{
      "configuration": {
          "appenders": {
              "Console": {
                  "name": "Console",
                  "target": "SYSTEM_OUT",
                  "PatternLayout": {
                      "pattern": "%date %thread %logger %message"
                  }
              }
          },
          "loggers": {
              "root": {
                  "level": "debug",
                  "appender-ref": {
                      "ref": "Console"
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>What I get:</p>
  
  <pre><code>[Fatal Error] log4j2.json:1:1: Content is not allowed in prolog.
  ERROR StatusLogger Error parsing D:\Dev\HDelphiCrawler\src\log4j2.json org.xml.sax.SAXParseException; systemId: file:///D:/Dev/HDelphiCrawler/src/log4j2.json; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
      at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
      at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
      at org.apache.logging.log4j.core.config.xml.XmlConfiguration.&lt;init&gt;(XmlConfiguration.java:140)
      at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:44)
      at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:410)
      ....and so on...
  ERROR StatusLogger No logging configuration
  </code></pre>
  
  <p>Jars in my lib folder:</p>
  
  <ul>
  <li>hamcrest-junit-2.0.0.0.jar</li>
  <li>jackson-annotations-2.6.1.jar</li>
  <li>jackson-core-2.6.1.jar</li>
  <li>jackson-databind-2.6.1.jar</li>
  <li>java-hamcrest-2.0.0.0.jar</li>
  <li>junit-4.12.jar</li>
  <li>kotlin-reflect.jar</li>
  <li>kotlin-runtime-sources.jar</li>
  <li>kotlin-runtime.jar</li>
  <li>log4j-api-2.3.jar</li>
  <li>log4j-core-2.3.jar</li>
  <li>log4j-slf4j-impl-2.3.jar</li>
  </ul>