title: Is there a way in logback.xml to specify file log destination through classpath:, without absolute path?
body: <p>I've in my logback.xml configuration file this appender:</p>
  
  <pre><code>&lt;appender name="FILE"
              class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;file&gt;classpath:addressbookLog.log&lt;/file&gt;
      &lt;encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"&gt;
        &lt;Pattern&gt;%d{dd MMM yyyy;HH:mm:ss} %-5level %logger{36} - %msg%n
        &lt;/Pattern&gt;
      &lt;/encoder&gt;
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"&gt;
        &lt;FileNamePattern&gt;classpath:addressbookLog.%i.log.zip&lt;/FileNamePattern&gt;
        &lt;MinIndex&gt;1&lt;/MinIndex&gt;
        &lt;MaxIndex&gt;10&lt;/MaxIndex&gt;
      &lt;/rollingPolicy&gt;
  
      &lt;triggeringPolicy
        class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"&gt;
        &lt;MaxFileSize&gt;2MB&lt;/MaxFileSize&gt;
      &lt;/triggeringPolicy&gt;
    &lt;/appender&gt;
  </code></pre>
  
  <p>so that I specify path to file in which to print logs in a relative way through classpath, but it doesn't work, no file addressbookLog.log is created and written.
  It only works with absolute paths like /home/andrea/.../resources/addressbookLog.log
  Have you any ideas on how to make it work with classpath?</p>