title: Spring boot application deployed as web app in external tomcat doesn't write in log file
body: <p>I have a spring boot application which generates a WAR file for me. I deploy the WAR file to a Tomcat server running on Linux. I have setup my </p>
  
  <blockquote>
    <p>application.yml</p>
  </blockquote>
  
  <p>like this:</p>
  
  <pre><code>logging:
          file: /var/log/tomcat/filereader1.log
          level:
              org.springframework: ERROR
              com.company: DEBUG
          pattern:
              file: '%d{yyyy-MMM-dd HH:mm:ss.SSS} %-5level [%thread] %logger{15} - %msg%n'
              console: '%d{yyyy-MMM-dd HH:mm:s
  </code></pre>
  
  <p>When I run the application (as a spring boot app with embedded tomcat) in my computer, I get a log file on the specified location, but when I deploy it on the Tomcat server I get no log file. </p>
  
  <p>Is it because the way I am generating my WAR file? Or can it be because of filesystem permissions?</p>
  
  <p>This is what I have tried</p>
  
  <ul>
  <li>I have tried putting in different directory. </li>
  <li>I have touched the file myself and chmoded it to 777 but still nothing.</li>
  </ul>
  
  <p>this is my POM:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
          &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
          &lt;groupId&gt;com.company&lt;/groupId&gt;
          &lt;artifactId&gt;file_reader&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;packaging&gt;war&lt;/packaging&gt;
  
          &lt;name&gt;file_reader&lt;/name&gt;
          &lt;description&gt;Demo project for Spring Boot&lt;/description&gt;
  
          &lt;parent&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
              &lt;version&gt;2.0.0.RELEASE&lt;/version&gt;
              &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
          &lt;/parent&gt;
  
          &lt;properties&gt;
              &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
              &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
              &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;/properties&gt;
  
          &lt;dependencies&gt;
              ...
          &lt;/dependencies&gt;
  
          &lt;build&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>