title: Logs not written to a log file : Spring boot and log4j.properties
body: <p>my log4j.properties</p>
  <pre><code>status=error
  name=PropertiesConfig
  filters=threshold
  filter.threshold.type=ThresholdFilter
  filter.threshold.level=debug
  appenders=console,rolling
  appender.console.type=Console
  appender.console.name=STDOUT
  appender.console.layout.type=PatternLayout
  appender.console.layout.pattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}{GMT+0}|%-5p|%c{1}|%M|%L|%replace{%m}{\r}{ }%n
  # Rotate log file
  appender.rolling.type=RollingFile
  appender.rolling.name=LogToRollingFile
  appender.rolling.fileName=/var/logs/app.log
  appender.rolling.filePattern=/var/logs/backup/app-%d{MM-dd-yyyy}-%i.log
  appender.rolling.layout.type=PatternLayout
  appender.rolling.layout.pattern=%d{yyyy-MM-dd'T'HH:mm:ss.SSS}{GMT+0}|%-5p|%c{1}|%M|%L|%replace{%m}{\r}{ }%n
  appender.rolling.policies.type=Policies
  appender.rolling.policies.time.type=TimeBasedTriggeringPolicy
  appender.rolling.policies.size.type=SizeBasedTriggeringPolicy
  appender.rolling.policies.size.size=100MB
  appender.rolling.strategy.type=DefaultRolloverStrategy
  appender.rolling.strategy.max=5
  #loggers = rolling
  rootLogger.level=info
  rootLogger.appenderRefs=stdout
  rootLogger.appenderRef.stdout.ref=STDOUT
  #logger.appenderRefs=rolling
  rootLogger.appenderRef.rolling.ref=LogToRollingFile
  </code></pre>
  <p>Dependecies :</p>
  <pre><code>&lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-web&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-log4j2&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>Log4 file is getting picked and i can see logs getting printed in the desired format, but file appender is not working .</p>
  <p>what is being missed by me ?</p>