Gary Gregory created LOG4J2-1818:
------------------------------------

             Summary: Fix rollover to work when filePattern contains no 
directory components
                 Key: LOG4J2-1818
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1818
             Project: Log4j 2
          Issue Type: Bug
          Components: Appenders
    Affects Versions: 2.8
            Reporter: Gary Gregory
            Assignee: Gary Gregory


See https://github.com/apache/logging-log4j2/pull/59

Prior to this patch, the following config threw NPE at parent.mkdirs() because 
parent was null when using e.g.:

{code:xml}
        <RollingRandomAccessFile name="FILE"
                                 fileName="foo.log"
                                 filePattern="foo-%d{yyyy-MM-dd}-%i.log.gz"
                                 immediateFlush="false">
{code}

while this config did not:

{code:xml}
        <RollingRandomAccessFile name="FILE"
                                 fileName="foo.log"
                                 filePattern="./foo-%d{yyyy-MM-dd}-%i.log.gz"
                                 immediateFlush="false">
{code}

e.g. by adding ./ in front of the filePattern value.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to