[logback-dev] [JIRA] Commented: (LBCORE-130) Can't use path with parenthesis for logging

Ceki Gulcu (JIRA) noreply-jira at qos.ch
Tue Dec 8 11:25:42 CET 2009


    [ http://jira.qos.ch/browse/LBCORE-130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11422#action_11422 ] 

Ceki Gulcu commented on LBCORE-130:
-----------------------------------

Parenthesis have special meaning in conversion specifiers, which is usually helpful. In this particular case, the same code is used to parse the file name pattern where the special meaning for parenthesis makes no sense. I'll look into it.



> Can't use path with parenthesis for logging
> -------------------------------------------
>
>                 Key: LBCORE-130
>                 URL: http://jira.qos.ch/browse/LBCORE-130
>             Project: logback-core
>          Issue Type: Bug
>          Components: Pattern
>    Affects Versions: 0.9.16
>            Reporter: Matthias
>            Assignee: Ceki Gulcu
>            Priority: Minor
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the logback-dev mailing list