[ https://issues.apache.org/jira/browse/LOG4J2-3154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406935#comment-17406935 ]
Volkan Yazici commented on LOG4J2-3154: --------------------------------------- I don't know if {{NameAbbreviator}} can be used for stack traces, I will check it. Mind sharing why didn't you go with the option of configuring {{maxStringLength}} or [stack trace truncation|https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-exception] instead? > 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)