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

Syslog: Optional escaping of newlines in message body, optionally include stack trace

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0-beta3
    • 2.0-beta4
    • Appenders, Layouts
    • N/A

    Description

      Syslog (both RFC-3164 and 5424) use newline characters to frame messages. As Log4J2 messages may include newlines in the message body, it is necessary to replace newlines with a configurable escape string.

      I've implemented a configuration option "newLineEscape" which accepts a replacement string. The default is to not escape newlines (i.e. current behavior).

      I've also implemented a configuration option "exceptionConverstion", which accepts the same options as PatternLayout's %exception field. If no value is specified, exceptions are not included.

      Attachments

        1. syslog-escape-newlines.patch
          12 kB
          Scott Severtson
        2. syslog-escape-newlines-and-include-stack-trace.patch
          16 kB
          Scott Severtson

        Activity

          People

            rgoers Ralph Goers
            ssevertson Scott Severtson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: