title: logback.xml Date only
body: <p>I am new to coding and stackoverflow, We are using logback for logging our application, as of now we are using {fileName}.%d{yyyy-MM-dd}.log naming convention for the time based rolling policy (rolling take place each and every day) and have set 30 days as the maximum time for a log to be stored in the application. We need to change the naming convention to only date format ({fileName}.%d{dd}.log). But we are getting "The date format in fileNamePattern will result in collisions in the names of archived log files." error</p>
  
  <p>
  </p>
  
  <pre><code>&lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;
      &lt;layout class="ch.qos.logback.classic.PatternLayout"&gt;
          &lt;Pattern&gt;
              %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
          &lt;/Pattern&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;appender name="dailyRollingFileAppender"
            class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;
      &lt;file&gt;logs/deliveryService.log&lt;/file&gt;
      &lt;encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"&gt;
          &lt;Pattern&gt;
              %d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n
          &lt;/Pattern&gt;
      &lt;/encoder&gt;
  
      &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;
          &lt;!-- rollover daily --&gt;
          &lt;fileNamePattern&gt;logs/deliveryService.%d{yyyy-MM-dd}.log
          &lt;/fileNamePattern&gt;
          &lt;!-- Delete log after 30 days --&gt;
          &lt;maxHistory&gt;30&lt;/maxHistory&gt;
      &lt;/rollingPolicy&gt;
  
  &lt;/appender&gt;
  
  
  &lt;!-- Send logs to both console and file audit --&gt;
  &lt;logger name="com.bnsf" level="debug"
          additivity="false"&gt;
      &lt;appender-ref ref="dailyRollingFileAppender" /&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
  &lt;/logger&gt;
  
  &lt;root level="INFO"&gt;
      &lt;appender-ref ref="STDOUT" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p></p>