title: Log4j2 file created but not log written
body: <p>I have used log4j2 with springboot, log file has been created but logs are not written in file. </p>
  
  <p><strong>log4j2.properties</strong></p>
  
  <pre><code>name=PropertiesConfig
  property.filename = /export/home/apps/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=${filename}/app-frontend.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=guru.springframework.blog.log4j2properties
  logger.file.level = debug
  logger.file.appenderRefs = file
  logger.file.appenderRef.file.ref = LOGFILE
  
  rootLogger.level = debug
  rootLogger.appenderRefs = stdout
  rootLogger.appenderRef.stdout.ref = STDOUT
  </code></pre>
  
  <p><strong>pom.xml</strong></p>
  
  <pre><code>&lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-log4j2&lt;/artifactId&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  </code></pre>
  
  <p>method using logger</p>
  
  <pre><code>private static Logger logger = LogManager.getLogger();
  
      @RequestMapping(value="/check", method = RequestMethod.GET)
      public String healthCheck() {
  
          logger.debug("Health-check invoked");
  
          return "Hey, I am fine";
      }
  </code></pre>
  
  <p>Above I have mention the codes I have used. Still can not find a way to solve. Logs are even not appearing in the console. </p>