Log4j 2
  1. Log4j 2
  2. LOG4J2-136

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta3
    • Fix Version/s: 2.0-beta4
    • Component/s: Appenders, Layouts
    • Labels:
    • Environment:

      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.

        Activity

          People

          • Assignee:
            Ralph Goers
            Reporter:
            Scott Severtson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development