You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/01/16 06:05:00 UTC

[jira] [Commented] (LOG4J2-2190) Output Json object for ObjectMessage in JsonLayout

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

ASF GitHub Bot commented on LOG4J2-2190:
----------------------------------------

GitHub user franzwong opened a pull request:

    https://github.com/apache/logging-log4j2/pull/141

    LOG4J2-2190 support writing JSON object in message field

    If we can make message as a Json object, user does not need to deserialize twice (first the whole log event, second the message field).
    Also, @JsonSerialize annotation defined in LogEventJsonMixIn prevents user to override the serializer.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/franzwong/logging-log4j2 LOG4J2-2190

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4j2/pull/141.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #141
    
----
commit 2d82319333f49b2524dc08a633cac73dd61323bb
Author: Franz Wong <fr...@...>
Date:   2018-01-16T05:56:06Z

    LOG4J2-2190 support writing JSON object in message field

----


> Output Json object for ObjectMessage in JsonLayout
> --------------------------------------------------
>
>                 Key: LOG4J2-2190
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2190
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Franz Wong
>            Priority: Major
>
> Currently, the message field is a JSON "string" instead of a JSON object. We should add a new parameter in JsonLayout to allow converting to JSON object if it is ObjectMessage.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)