PS-264 Added ThrowableConversionPattern option for SyslogAppender - #1
Open
vasanthela wants to merge 1 commit into
Open
PS-264 Added ThrowableConversionPattern option for SyslogAppender#1vasanthela wants to merge 1 commit into
vasanthela wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the ability to append additional information to log messages during java exceptions. When encountering a log event of type throwable, and given a layout that ignores throwable, SyslogAppender by default will output a multiline stacktrace with only the HEADER.
One can define the property option ThrowableConversionPattern for SyslogAppender with any conversion pattern supported by PatternLayout.
Sample log4j definition:
log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
log4j.appender.SYSLOG.SyslogHost=127.0.0.1
log4j.appender.SYSLOG.facility=LOCAL3
log4j.appender.SYSLOG.Header=true
log4j.appender.SYSLOG.ThrowableConversionPattern=%X{PID}
log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.SYSLOG.layout.ConversionPattern=%d %-5p: %m%n