[logback-dev] [JIRA] (LOGBACK-1481) When encoder pattern set as a variable then logback skips newline %n

QOS.CH (JIRA) noreply-jira at qos.ch
Sun Aug 18 17:08:00 CEST 2019


Sergey Ponomarev created LOGBACK-1481:
-----------------------------------------

             Summary: When encoder pattern set as a variable then logback skips newline %n
                 Key: LOGBACK-1481
                 URL: https://jira.qos.ch/browse/LOGBACK-1481
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.2.3
         Environment: Linux
            Reporter: Sergey Ponomarev
            Assignee: Logback dev list
            Priority: Minor


I have following logback.xml:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
  <property scope="context" name="pattern" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z', UTC} ${LOG_LEVEL_PATTERN:-%5p} %logger [%t] \(%X{trace}\) %X{loggingMessageExtender}: %m%n" />
  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <Pattern>${pattern}</Pattern>
    </encoder>
  </appender>
  <root level="INFO">
    <appender-ref ref="CONSOLE"/>
  </root>
</configuration>
{code}

Then all log statements are written in the single line even given than the pattern have %n in the end



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


More information about the logback-dev mailing list