Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
None
-
None
-
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
<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.