title: log4j2 monitorInterval springboot not working
body: <p>Im trying to get hot reloading to work with my logging level. The monitorInterval Should do the trick for me, but for some reason it doesnt work.</p>
  
  <p>My log4j2.xml file looks like this:</p>
  
  <pre><code>&lt;Configuration monitorInterval="10"&gt;
    &lt;Appenders&gt;
      &lt;Console name="STDOUT" target="SYSTEM_OUT"&gt;
        &lt;PatternLayout
          pattern="%d{ISO8601}  [%-12.-12t] %-5p [%12.12X{CorrelationId}] [%-30.-30X{Path}] %logger{36}:%L - %msg%n"/&gt;
      &lt;/Console&gt;
  
      &lt;File name="anywhere" fileName="anywhere.log" append="false"&gt;
        &lt;PatternLayout&gt;
          &lt;Pattern&gt;%d{ISO8601}  [%-12.-12t] %-5p [%12.12X{CorrelationId}] [%-30.-30X{Path}] %logger{36}:%L - %msg%n&lt;/Pattern&gt;
        &lt;/PatternLayout&gt;
      &lt;/File&gt;
  
    &lt;/Appenders&gt;
  
    &lt;Loggers&gt;
      &lt;logger name="com.cetrea" level="info"/&gt;
  
      &lt;Root level="warn"&gt;
        &lt;AppenderRef ref="anywhere"/&gt;
        &lt;AppenderRef ref="STDOUT"/&gt;
      &lt;/Root&gt;
    &lt;/Loggers&gt;
  &lt;/Configuration&gt;
  </code></pre>
  
  <p>Im testing it with my rest api, and when i hit this route, it should print out just LOG.info which it does.</p>
  
  <pre><code>private static final Logger LOG = LogManager.getLogger(TokenController.class);
  
    @RequestMapping(value = "/sensitive-data/{token}", method = RequestMethod.GET, produces = "text/plain;charset=UTF-8")
    public ResponseEntity getData(@PathVariable("token") String token) {
      if (tokenMap.containsKey(token)) {
        return ResponseEntity.ok(tokenMap.get(token));
      } else {
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        LOG.info("Hit with wrong or expired token at " + timestamp + "");
        LOG.debug("debug thing");
        return new ResponseEntity("Token not found, or has expired", HttpStatus.NOT_FOUND);
      }
    }
  </code></pre>
  
  <p>Now if i change the level to debug, i would expect it to also print out the LOG.debug, but it doesn't. This doesn't take in effect until i restart the program, instead of it hot reloading 10 seconds later.</p>