You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2021/12/05 22:26:00 UTC

[jira] [Commented] (LOG4J2-2525) Add max message size limit to JSON Layout

    [ https://issues.apache.org/jira/browse/LOG4J2-2525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17453704#comment-17453704 ] 

Ralph Goers commented on LOG4J2-2525:
-------------------------------------

JsonLayout is effectively deprecated. You should transition to the JsonTemplateLayout.

> Add max message size limit to JSON Layout
> -----------------------------------------
>
>                 Key: LOG4J2-2525
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2525
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Layouts
>    Affects Versions: 2.11.1
>            Reporter: Fabian Braun
>            Priority: Minor
>
> In edge-cases the json representation of stack-traces can become too large for log-consuming systems (>16KB in the specific case).
> Therefore I'd like to propose introducing a new configuration parameter {{limitMessageSize}} to keep the log record within certain size boundaries under all circumstances. Similar to the {{maxLength}} option available in the PatternLayout.
>  
> For more context, see this question on stackoverflow:
>  [https://stackoverflow.com/questions/53335345/limit-log-event-length-in-log4j2-json-layout-to-prevent-hitting-docker-log-drive]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)