In my current project i want to create log files date wise i.e. log files should reside inside
folder having name as date.
Also archiving should happen at that particular folder.
Current appender that i am using looks like this (it does archiving of log file based on size).
<appender name="AUDITFILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${PROJECT_HOME}\\projectname\\audits\\myproject.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${PROJECT_HOME}\\projectname\\audits\\myproject_%d{yyyy-MM-dd}.%i.zip
</fileNamePattern>
<maxHistory>10</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10KB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%date %msg%n
</pattern>
</encoder>
</appender>