I've in my logback.xml configuration file this appender:
<appender name="FILE"
            class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>classpath:addressbookLog.log</file>
    <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
      <Pattern>%d{dd MMM yyyy;HH:mm:ss} %-5level %logger{36} - %msg%n
      </Pattern>
    </encoder>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <FileNamePattern>classpath:addressbookLog.%i.log.zip</FileNamePattern>
      <MinIndex>1</MinIndex>
      <MaxIndex>10</MaxIndex>
    </rollingPolicy>
    <triggeringPolicy
      class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <MaxFileSize>2MB</MaxFileSize>
    </triggeringPolicy>
  </appender>
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?
 
     
     
    