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

Empty default variable value results in _IS_UNDEFINED

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • 1.5.12
    • 1.2.3
    • logback-core
    • None

    Description

      Config file:

      <?xml version="1.0" encoding="UTF-8"?>
      <configuration>
      
        <appender name="HUMAN" class="ch.qos.logback.core.FileAppender">
          <file>test.log</file>
          <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %level %logger{35} - %msg ${log.pattern.suffix:-}%n</Pattern>
          </encoder>
        </appender>
      
        <root level="INFO">
          <appender-ref ref="HUMAN" />
        </root>
      
      </configuration>
      

      The variable log.pattern.suffix is not defined.

      Observed behaviour: variable is replaced with "log.pattern.suffix_IS_UNDEFINED"

      Expected behaviour: variable should be replaced with empty string (as there is empty string after ":-".

      Attachments

        Activity

          People

            logback-dev Logback dev list
            nemecec Neeme Praks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: