[logback-dev] [JIRA] (LOGBACK-1497) Empty default variable value results in _IS_UNDEFINED

QOS.CH (JIRA) noreply-jira at qos.ch
Tue Jan 21 15:03:00 CET 2020


Neeme Praks created LOGBACK-1497:
------------------------------------

             Summary: Empty default variable value results in _IS_UNDEFINED
                 Key: LOGBACK-1497
                 URL: https://jira.qos.ch/browse/LOGBACK-1497
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.2.3
            Reporter: Neeme Praks
            Assignee: Logback dev list
            Priority: Minor


Config file:

{code:xml}
<?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>
{code}

The variable ${log.pattern.suffix} is not defined.

*Observed behaviour*: ${log.pattern.suffix:-} is replaced with "log.pattern.suffix_IS_UNDEFINED"

*Expected behaviour*: ${log.pattern.suffix:-} should be replaced with empty string (as there is empty string after ":-".



--
This message was sent by Atlassian JIRA
(v7.3.1#73012)


More information about the logback-dev mailing list