[
https://issues.apache.org/jira/browse/LOG4J2-2995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17260413#comment-17260413
]
Volkan Yazici commented on LOG4J2-2995:
---------------------------------------
Thanks for the report [[email protected]]! This is known issue (see
[#LOG4J2-2961]) and has already been fixed. It will be available in 2.14.1 (or
2.15.0?) release.
As a temporary work around, you can just copy-paste the contents of
{{LogstashJsonEventLayoutV1.json}} into {{eventTemplate}} and add your
additional fields there.
> How to use eventTemplateAdditionalFields in log4j2.yaml
> -------------------------------------------------------
>
> Key: LOG4J2-2995
> URL: https://issues.apache.org/jira/browse/LOG4J2-2995
> Project: Log4j 2
> Issue Type: Question
> Components: Appenders
> Affects Versions: 2.14.0
> Reporter: Michal Stefan
> Priority: Major
>
> Hi,
> I am struggling to find a way, how exactly to write the syntax in yaml to be
> able to use
> EventTemplateAdditionalFields in JsonTemplateLayout. You don't provide any
> example on your website and nothing I have tried works. My current config
> looks like this:
> {code:java}
> Configuration:
> Appenders:
> Console:
> name: LogToConsole
> target: SYSTEM_OUT
> JsonTemplateLayout:
> eventTemplateUri: classpath:LogstashJsonEventLayoutV1.json
> stackTraceEnabled: true
> maxStringLength: 32768
> EventTemplateAdditionalFields:
> EventTemplateAdditionalField:
> - key: service
> value: profiles-profile-service
> Loggers:
> Root:
> level: info
> AppenderRef:
> ref: LogToConsole
> {code}
>
> Could you please help?
> Best Regards,
> Michal Stefan
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)