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 2021/08/18 19:50:06 UTC

[GitHub] [logging-log4j2] arVahedi commented on pull request #562: Close jira issue LOG4J2-3138

arVahedi commented on pull request #562:
URL: https://github.com/apache/logging-log4j2/pull/562#issuecomment-901385314


   > Why don't you simply use `JsonTemplateLayout`?
   > 
   > On Wed, 18 Aug 2021, 02:09 Alireza Vahedi ***@***.***> wrote:
   > 
   > > Add Enhanced json layout for defined dynamic class as model of json
   > > structure
   > >
   > > Signed-off-by: arVahedi ***@***.***
   > > ------------------------------
   > > You can view, comment on, or merge this pull request online at:
   > >
   > >   https://github.com/apache/logging-log4j2/pull/562
   > > Commit Summary
   > >
   > >    - Close jira issue LOG4J2-3138
   > >
   > > File Changes
   > >
   > >    - *A*
   > >    log4j-layout-jackson-json/src/main/java/org/apache/logging/log4j/jackson/json/layout/EnhancedJsonJacksonFactory.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-2bb5ea46caac5348ee3004bcf6a425afcfba55dd338c4eb89b0f480a25689acc>
   > >    (23)
   > >    - *A*
   > >    log4j-layout-jackson-json/src/main/java/org/apache/logging/log4j/jackson/json/layout/EnhancedJsonLayout.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-d59581b9a099148b941846dfc3ee55b77a610ac237f6f826c49b0b1c68b60034>
   > >    (132)
   > >    - *A*
   > >    log4j-layout-jackson/src/main/java/org/apache/logging/log4j/jackson/AbstractEnhancedJacksonFactory.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-7296cf0eaee5f1fc60465c3d572e77fadbd0d232e7bc68cc7c6bd4086818dabe>
   > >    (32)
   > >    - *A*
   > >    log4j-layout-jackson/src/main/java/org/apache/logging/log4j/jackson/AbstractEnhancedJacksonLayout.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-6fe5da58aa42e680d794da05ab6a15060605387d74e2040e201cdc08aca44acd>
   > >    (240)
   > >    - *A*
   > >    log4j-layout-jackson/src/main/java/org/apache/logging/log4j/jackson/model/DefaultLogEventWrapper.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-ee680d10cee1ef0fe893037afd24134defa815e070238f7165fd57561024afc1>
   > >    (24)
   > >    - *A*
   > >    log4j-layout-jackson/src/main/java/org/apache/logging/log4j/jackson/model/JsonModelLogEventWrapper.java
   > >    <https://github.com/apache/logging-log4j2/pull/562/files#diff-8f33d792008b0a3559793b8ed9aa1d25b1e4677956067805db8155fe2f30329b>
   > >    (29)
   > >
   > > Patch Links:
   > >
   > >    - https://github.com/apache/logging-log4j2/pull/562.patch
   > >    - https://github.com/apache/logging-log4j2/pull/562.diff
   > >
   > > —
   > > You are receiving this because you are subscribed to this thread.
   > > Reply to this email directly, view it on GitHub
   > > <https://github.com/apache/logging-log4j2/pull/562>, or unsubscribe
   > > <https://github.com/notifications/unsubscribe-auth/AAARTSJZVTNN2AJ7LTZC37DT5LTZBANCNFSM5CK2VPRA>
   > > .
   > >
   > 
   
   `JsonTemplateLayout` is a great feature, but it is still limited. imagine I need to log some value out of LogEvent context and based on some logic at runtime, for example generate a activityId, digest value or something like that at runtime. 
   the `EnhancedJsonLayout` offers you a full control on what you need to log. 


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org

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