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

Error replace slash in pattern file when rolling file appender

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.1
    • Component/s: Appenders
    • Environment:

      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

            • Assignee:
              rpopma Remko Popma
              Reporter:
              limkin Pablo Vidal Otero

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment