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

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment