title: Spring Boot uses /tmp/spring.log file during testing
body: <p>One of my Spring Boot applications makes problems during its Maven <em>test</em> phase.</p>
  
  <p>Both during testing and "regular" application runtime, the Spring Boot application uses a logback configuration file very similar to <a href="https://github.com/spring-projects/spring-boot/blob/v1.3.1.RELEASE/spring-boot-samples/spring-boot-sample-logback/src/main/resources/logback-spring.xml" rel="noreferrer"><code>src/main/resources/logback-spring.xml</code></a>. This configuration file (transitively) includes the logback configuration files <a href="https://github.com/spring-projects/spring-boot/blob/v1.3.1.RELEASE/spring-boot/src/main/resources/org/springframework/boot/logging/logback/base.xml" rel="noreferrer"><code>base.xml</code></a> and <a href="https://github.com/spring-projects/spring-boot/blob/v1.3.1.RELEASE/spring-boot/src/main/resources/org/springframework/boot/logging/logback/file-appender.xml" rel="noreferrer"><code>file-appender.xml</code></a>. These configuration files set a <em>logback property</em> <code>LOG_FILE=/tmp/spring.log</code>.</p>
  
  <p>I guess it is best practice that file <code>/tmp/server.log</code> is owned by user and group <code>${MY_SPRING_BOOT_APPLICATION}</code>.</p>
  
  <p>Jenkins runs as user <code>jenkins</code>. <code>jenkins</code> does not have write permissions for <code>/tmp/server.log</code>. Therefore the JUnit tests fail when executed by Jenkins.</p>
  
  <ul>
  <li>What is the best way to configure logging so that it works well during a Jenkins <em>build-with-tests</em> <strong>and</strong> so that it sets up <em>daily rolling logging</em> when leveraging <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html" rel="noreferrer">Spring Boot's <em>SysV init.d</em> service functionality</a> (which puts logs into <code>/var/log/</code>)?</li>
  <li>Will file <code>/tmp/spring.log</code> be modified (and therefore be broken) concurrently if there are two or more Spring Boot applications running at the same time?</li>
  </ul>