title: Log4j property file is ingored
body: <p>For some reason, my log4j configuration file is getting ignored.</p>
  <p>The configuration is file found in</p>
  <pre><code>C:\dev\pa-backup-restore-utility\BackupRestore\log4j2.properties
  </code></pre>
  <p>Here are the contents of the file:</p>
  <pre><code>name=PropertiesConfig
  property.filename = logs
  appenders = console, file
  
  appender.console.type = Console
  appender.console.name = STDOUT
  appender.console.layout.type = PatternLayout
  appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  appender.file.type = File
  appender.file.name = LOGFILE
  appender.file.fileName=logs/backupRestore.log
  appender.file.layout.type=PatternLayout
  appender.file.layout.pattern=[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
  
  loggers=file
  
  logger.file.name=log4j2.properties
  logger.file.level = error
  logger.file.appenderRefs = file
  logger.file.appenderRef.file.ref = LOGFILE
  
  rootLogger.level = error
  rootLogger.appenderRefs=stdout,logfile
  rootLogger.appenderRef.stdout.ref=STDOUT
  rootLogger.appenderRef.logfile.ref=LOGFILE
  </code></pre>
  <p>The batch file that runs the class is located in the same directory as the configuration file.</p>
  <p>The command from the batch file is run as follows:</p>
  <pre><code>set javaPath=&quot;%appDir%\jre\bin\java.exe&quot;
  
  %javaPath% -Dapp.properties.path=windows.app.properties -Dlog4j.configurationFile=file:log4j2.properties -jar backupRestore-jar-with-dependencies.jar -b
  </code></pre>
  <p>The entry in pom.xml for this is:</p>
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;
      &lt;artifactId&gt;log4j-to-slf4j&lt;/artifactId&gt;
      &lt;version&gt;2.16.0&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
          &lt;version&gt;1.7.36&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  <p>Here's how a logger.info is called:</p>
  <pre><code>static void printWarning(String message) {
      logger.info(&quot;============== warning ===============================&quot;);
      logger.info(&quot;== &quot; + message);
      logger.info(&quot;============== warning ===============================&quot;);
  }
  </code></pre>
  <p>However, when I run the batch job, an info message gets displayed in the console:</p>
  <pre><code>[main] INFO com.sick.backup.util.Utils - ============== warning ===============================
  [main] INFO com.sick.backup.util.Utils - == here is an example message
  [main] INFO com.sick.backup.util.Utils - ============== warning ===============================
  </code></pre>
  <p>Also, a log file is no longer getting generated.</p>
  <p>This was all working at what point. I'm trying to track down the version to make sure it matches, but the only change I've made is to upgrade the version of log4j-to-slf4j due to prevent a vulnerability.</p>