Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-197

Can't use path with parenthesis for logging

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • None
    • None
    • logback-core
    • None

    Description

      I configured following appender:
      <appender name="WS_LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
      <Encoding>UTF-8</Encoding>
      <File>${catalina.home}/logs/webserver.log</File>
      <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
      <FileNamePattern>${catalina.home}/logs/webserver.%d

      {yyyy-MM-dd}.log</FileNamePattern>
      <MaxHistory>14</MaxHistory>
      </rollingPolicy>
      <layout class="ch.qos.logback.classic.PatternLayout">
      <PresentationHeader>ARCHIKART Webserver Logs</PresentationHeader>
      <Pattern>%date{dd.MM HH:mm:ss} %-20.20(%level [%thread]) - %msg%n</Pattern>
      </layout>
      </appender>
      In this case ${catalina.home} is "C:\Program Files (x86)\webserver".
      When the logback.xml is parsed the path "C:
      Program Files (x86)\\webserver
      /logs/webserver.%d{yyyy-MM-dd}

      .log" is only parsed to "C:
      Program Files (x86".
      That's why it causes an exception "FileNamePattern ... does not contain a valid DateToken" in TimeBasedRollingPolicy. When I use a path without parenthesis logging works fine. But this is the default program files directory on windows vista 64bit.

      I did not test 0.9.18, because I thought it would be a bigger work to change the logging of the server. I did not read anything of this in the Jira, so I think this error might still exist.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            mkr Matthias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: