[logback-dev] [JIRA] (LOGBACK-1353) Log files are not rotating if directory name and file name both have date pattern.

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Nov 13 11:39:00 CET 2017


Atul created LOGBACK-1353:
-----------------------------

             Summary: Log files are not rotating if directory name and file name both have date pattern.
                 Key: LOGBACK-1353
                 URL: https://jira.qos.ch/browse/LOGBACK-1353
             Project: logback
          Issue Type: Bug
          Components: logback-classic, logback-core
    Affects Versions: 1.2.3
            Reporter: Atul
            Assignee: Logback dev list


Log files don't rotate if *fileNamePattern* contains directory name and file name with date pattern.

<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">

<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">

<Pattern>%level %date [%thread] [%file:%line] %msg%n</Pattern>

</encoder>

<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">

<fileNamePattern>/data/logs/api/app/*%d\{yyyy-MM-dd}*/api.*%d\{yyyy-MM-dd-HH-mm}*.log</fileNamePattern>

<maxHistory>240</maxHistory>

</rollingPolicy>

</appender>

 

It start working fine , if date formatted directory is removed from fileNamePattern.

<fileNamePattern>/data/logs/api/app/api.*%d\{yyyy-MM-dd-HH-mm}*.log</fileNamePattern>

 

 

 



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list