title: Centos 6: Java Application not Logging to var/log
body: <p>We have a CentOs6 machine which was spun up in OpenStack recently.  A deployment of our companies application consists of building a war file and placing it in /usr/share/tomcat/webapps.  We have deployed it to other CentOs6 machines which were created about a month ago and it logs the application logs to <em>/var/log/myAppName/specifiLogFile.log</em> just fine.  It's only on the new machines where it's not working (note the older machines assumed to have the same configuration).</p>
  
  <p><strong>I believe we've narrowed it down to the server itself and not the application.  Other projects, which we build war files for, that are deployed to the new boxes should also log to <em>/var/log/myOtherApp/otherLogFile.log</em>, but do not.</strong>  </p>
  
  <p>I'm wondering if there is anywhere I can look to see why application logs are not being generated in <em>/var/log/...</em>  What would cause this?</p>
  
  <p>Permissions are 660 for the application's log directory and the correct user has access to read and write.</p>
  
  <p>What I've tried:</p>
  
  <p>Enabling debug in logback and investigating the following logs for issues:  <em>tomcat/logs/catalina.out</em>, <em>tomcat/logs/localhost.2016-06-05.log</em>, <em>/var/log/messages</em></p>
  
  <p>The only other difference was the fact that our older apps were running Java 7, and the new CentOs boxes should be on Java 8.  Even after upgrading to Java 8 the problem persists.</p>
  
  <p><strong>EDIT:</strong>
  Including my logback configuration, but I must say that this configuration works fine on the server that I created about a month ago...  I'm sure that this has to do with some configuration on the new server itself.</p>
  
  <pre><code>import ch.qos.logback.classic.encoder.PatternLayoutEncoder
  import ch.qos.logback.core.rolling.RollingFileAppender
  import ch.qos.logback.core.rolling.TimeBasedRollingPolicy
  import ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP
  
  import static ch.qos.logback.classic.Level.DEBUG
  import static ch.qos.logback.classic.Level.WARN
  import static ch.qos.logback.classic.Level.INFO
  
  scan("30 seconds")
  
  appender("ROLLING", RollingFileAppender) {
    file = "/var/log/myApp/myApp.log"
  
    encoder(PatternLayoutEncoder) {
      pattern = "%date %level [%thread] %logger{10} [%file:%line] %msg%n"
    }
  
    rollingPolicy(TimeBasedRollingPolicy){
      // Rollover daily
      fileNamePattern = "/var/log/myApp/myApp%d{yyyy-MM-dd}.log.gz"
  
      // Delete the archived files older than 10 days
      maxHistory = 10
    }
  
  }
  
  root(DEBUG, ["ROLLING"])
  </code></pre>