You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/07/07 20:44:00 UTC
[jira] [Commented] (LOG4J2-1923) JSONLayout should allow stacktrace
as string
[ https://issues.apache.org/jira/browse/LOG4J2-1923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16078657#comment-16078657 ]
ASF subversion and git services commented on LOG4J2-1923:
---------------------------------------------------------
Commit 0b8f7431684dd634f32cbc374478200e3cd42d2c in logging-log4j2's branch refs/heads/master from [~imriz]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=0b8f743 ]
LOG4J2-1923 Allow having the stacktrace as a string in JSONLayout, XMLLayout and YAMLLayout
> JSONLayout should allow stacktrace as string
> --------------------------------------------
>
> Key: LOG4J2-1923
> URL: https://issues.apache.org/jira/browse/LOG4J2-1923
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Affects Versions: 2.8.2
> Reporter: Imri Zvik
> Assignee: Mikael Ståldal
> Priority: Trivial
>
> In previous versions, log4j's JSONLayout used to output stacktraces as strings. Some places in the configuration still mention it: https://logging.apache.org/log4j/2.x/manual/layouts.html#JSONLayout
> The motivation behind restoring this functionality, is that sometimes the logs are used to be viewed by humans, via UIs like Kibana or docker logs with jq, and the nested JSON object that log4j2 currently produces is mostly unreadable.
> Various workaround exists, like using logstash to flatten this, but IMO log4j2 should have a configuration knob to do this out of the box and save the unneeded transformation, so the logs could be easily viewed at the source (e.g. docker logs command).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)