[logback-dev] [JIRA] Created: (LBCLASSIC-328) Bad parsing of pattern containing ')' with use property

Jan Valta (JIRA) noreply-jira at qos.ch
Fri Apr 27 12:58:26 CEST 2012


Bad parsing of pattern containing ')' with use property
-------------------------------------------------------

                 Key: LBCLASSIC-328
                 URL: http://jira.qos.ch/browse/LBCLASSIC-328
             Project: logback-classic
          Issue Type: Bug
          Components: Other
         Environment: Operating System: All
Platform: All
            Reporter: Jan Valta
            Assignee: Logback dev list
            Priority: Minor


The following config works fine:

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
  <encoder>
    <pattern>\(%file\)</pattern>
  </encoder>
</appender>

If I use property to define pattern, so it isn't work:

<property name="PATTERN" value="\(%file\)" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
  <encoder>
    <pattern>${PATTERN}</pattern>
  </encoder>
</appender>

I must use  "\\)" instead "\)", then following config work fine:

<property name="PATTERN" value="\\(%file\\)" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
  <encoder>
    <pattern>${PATTERN}</pattern>
  </encoder>
</appender>


-- 
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