You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Michael Cramer (Jira)" <ji...@apache.org> on 2021/08/30 15:06:00 UTC

[jira] [Updated] (LOG4J2-3154) Support NameAbbreviator in ExceptionResolver when using JsonTemplateLayout

     [ https://issues.apache.org/jira/browse/LOG4J2-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Cramer updated LOG4J2-3154:
-----------------------------------
    Labels: abbreviation exception json layout resolver template  (was: )

> Support NameAbbreviator in ExceptionResolver when using JsonTemplateLayout
> --------------------------------------------------------------------------
>
>                 Key: LOG4J2-3154
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3154
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Layouts
>    Affects Versions: 2.14.1
>            Reporter: Michael Cramer
>            Priority: Major
>              Labels: abbreviation, exception, json, layout, resolver, template
>
> when stack traces are written to the JSON that is later consumed by Graylog for example sometimes the processing failed because the field containing the stack trace is larger than 32k which is a limit of the in ElasticSearch ([https://github.com/Graylog2/graylog2-server/issues/873)]
> I propose to add support for using the already existing NameAbbreviator to shorten stack traces. it might not completely solve all issues that the field might have content that is too large but tries to mitigate it.
> {noformat}
>    {
>      "$resolver": "exception",
>      "field": "stackTrace",
>      "stackTrace": {
>        "stringified": true
>      }
>    } {noformat}
> can be smth. like
> {noformat}
>    {
>      "$resolver": "exception",
>      "field": "stackTrace",
>      "stackTrace": {
>        "stringified": true,
>        "abbreviatePattern": "1."
>      }
>    } {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)