title: How to change the directory in which logs are stored using java.util.logging.*
body: <p>I'm running a web app under tomcat and I've configured logging like this (via a contextInitialized hook):</p>
  
  <pre><code>    Logger rootLogger = Logger.getLogger("");
      String date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
      FileHandler logHandler = new FileHandler(
          "myapp_" + date + "_%u.log",
          524288000, // 500 MB max size
          1, // one log file at a time
          true // if it exists: append, don't overwrite
      );
      Level defaultLevel = Level.INFO;
      logHandler.setFormatter(new XMLFormatter());
      logHandler.setLevel(defaultLevel);
      for (Handler h : rootLogger.getHandlers()) {
          rootLogger.removeHandler(h);
      }
      rootLogger.setLevel(defaultLevel);
      rootLogger.addHandler(logHandler);
  </code></pre>
  
  <p>Unfortunately the logs don't get created under /var/log.  They get created in /var/lib/tomcat6/ like /var/lib/tomcat6/myapp_2012-08-13_0.log.  I'd like to change it to /var/log/myapp/ like: /var/log/myapp/myapp_2012-08-13_0.log  I don't see anything I can set on the FileLogger to make this happen.  Am I missing something obvious, or is there a way to achieve it?</p>