Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-829

Error replace slash in pattern file when rolling file appender

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.2
    • 2.1
    • Appenders
    • Development machine Windows 7

    Description

      With following log configuration

      <RollingFile name="RollingFile" fileName="${sys:user.home}/logs/app.log"
                       filePattern="${sys:user.home}/logs/app-%d{MM-dd-yyyy}.log">
            <PatternLayout>
              <pattern>%d %p %c{1.} [%t] %m%n</pattern>
            </PatternLayout>
            <TimeBasedTriggeringPolicy />
          </RollingFile>
      

      When start, the file name is created correctly (C:\user/logs/app.log) but when the file will rotate with file pattern, the path name is wrong. The system property user.home doesn't has slashes. C:user/logs/app-0915-2014.log

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              limkin Pablo Vidal Otero
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: