You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2020/09/01 07:21:54 UTC

[GitHub] [logging-log4j2] vy commented on pull request #335: Import of LogstashLayout as JsonTemplateLayout

vy commented on pull request #335:
URL: https://github.com/apache/logging-log4j2/pull/335#issuecomment-684510122


   @ramazanpolat, yes, `JsonTemplateLayout` can do that. You just need to set `stringified` to `false` (the default) as follows:
   
   ```json
   {
     "$resolver": "message",
     "stringified": false
   }
   ```
   
   Further, `LogstashLayout` can also do that. In `LogstashLayout`, you just need to use `${json:message:json}` directive rather than `${json:message}`.
   
   HTH.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org