Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2324

PatternLayout handling of Throwable alternate separator doesn't accept special characters?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.11.0
    • Fix Version/s: None
    • Component/s: Layouts

      Description

      When attempting to use an alternate line separator for Throwable stack lines, it seems impossible to use special characters like \t \r \n or anything else.  It also seems impossible to use variable references so one cannot use ${sys:line.separator} as well as other characters.

      In the case of simple uses of \t \r \n or anything else are converted to plain text, actually resulting in "\t" in the output.

      %-5level - %d{yyyy.MM.dd hh:mm:ss zzz} [%t @ %logger{1}] - %msg%n%ex{separator(\r\n\t)}%n
      

       If there's a way to do this, it isn't clear in the documentation.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                robross0606@gmail.com Robert Ross
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: