[prev in list] [next in list] [prev in thread] [next in thread] 

List:       logback-dev
Subject:    [logback-dev] [JIRA] (LOGBACK-1248) Allow leading zeros in %i pattern
From:       "QOS.CH (JIRA)" <noreply-jira () qos ! ch>
Date:       2017-01-26 13:51:00
Message-ID: JIRA.14282.1485438604000.581.1485438660245 () Atlassian ! JIRA
[Download RAW message or body]

Eugene Petrenko created LOGBACK-1248:
----------------------------------------

             Summary: Allow leading zeros in %i pattern
                 Key: LOGBACK-1248
                 URL: https://jira.qos.ch/browse/LOGBACK-1248
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.1.7
            Reporter: Eugene Petrenko
            Assignee: Logback dev list


I use the appender like
{code}
<appender name="ROLL-INFO" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
      <fileNamePattern>${IR}/vcs-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
      <maxFileSize>15MB</maxFileSize>
      <maxHistory>100</maxHistory>
    </rollingPolicy>
    <encoder>
      <pattern>${log-format}</pattern>
    </encoder>
  </appender>
{code}

the pattern I specify includes file counter in each day. In may case it may easily \
turn out I have hundreds of files per day. 

The problem is that {{%i}} syntax does not allow me to have leading zeroes in the \
names I generates. This ends up it's a but tricky to look through files list I have \
on my disk, which are sorted in sexicographical order. 

Having an ability to force adding leading zeroes to the pattern will solve the issue.



--
This message was sent by Atlassian JIRA
(v6.4.12#64027)
_______________________________________________
logback-dev mailing list
logback-dev@qos.ch
http://mailman.qos.ch/mailman/listinfo/logback-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic