You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Christian (JIRA)" <ji...@apache.org> on 2018/08/15 14:51:00 UTC
[jira] [Updated] (LOG4J2-2410) extend pattern layout with
exceptionName for conversion pattern exception
[ https://issues.apache.org/jira/browse/LOG4J2-2410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian updated LOG4J2-2410:
------------------------------
Summary: extend pattern layout with exceptionName for conversion pattern exception (was: extend pattern layout with exceptionName for pattern exception)
> extend pattern layout with exceptionName for conversion pattern exception
> -------------------------------------------------------------------------
>
> Key: LOG4J2-2410
> URL: https://issues.apache.org/jira/browse/LOG4J2-2410
> Project: Log4j 2
> Issue Type: New Feature
> Components: Pattern Converters
> Reporter: Christian
> Priority: Critical
>
> We are currently implementing an own JSON layout using the pattern layout including the %enc conversion pattern. Unfortunately, it is not possible to get the exceptionName using the pattern layouts like in the JSON appender.
> Example exception:
> {code:java}
> de.test.test.UnknownIdentifierException: CronJob with code test not found
> at de.test.test.service.Services.validateSingleResultWithType(Services.java:88)
> {code}
> In the JSON Layout with includeStacktrace=true, there will be a new field thrown_name which includes only the exception name:
> {code:java}
> de.test.test.UnknownIdentifierException{code}
>
> This would be helpful in the pattern layout, too. With this field a customer can filter for specific exceptions like for example Nullpointers.
> A possible implementation could be added to the exception pattern
> {code:java}
> %ex{short.exceptionName}{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)