[
https://issues.apache.org/jira/browse/LOG4J2-3197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450691#comment-17450691
]
Volkan Yazici edited comment on LOG4J2-3197 at 11/29/21, 8:33 PM:
------------------------------------------------------------------
For the records, I ran the Log4j-bridged-to-Logback solution suggested in the
Datadog manual, and it emits a JSON object prefixed by the {{DD_API_KEY}}
environment variable and a whitespace.
Rather than implementing anything, I will try to get in touch with Datadog and
see if they (can?) support providing the API key as a field of the JSON.
was (Author: vy):
For the records, I ran the Log4j-bridged-to-Logback solution suggested in the
Datadog manual, and it emits a JSON object prefixed by the {{DD_API_KEY}}
environment variable and a whitespace.
> Support agentless logging to Datadog
> ------------------------------------
>
> Key: LOG4J2-3197
> URL: https://issues.apache.org/jira/browse/LOG4J2-3197
> Project: Log4j 2
> Issue Type: Improvement
> Components: Layouts
> Affects Versions: 2.14.1
> Reporter: Mikael Ståldal
> Assignee: Volkan Yazici
> Priority: Minor
>
> The documentation for Datadog contains information on how to setup Log4j 2 to
> send logs to Datadog. However, for the agentless configuration, it says its
> not possible with Log4j 2 and resorts to bridging to Logback:
> [https://docs.datadoghq.com/logs/log_collection/java/?tab=log4j2#agentless-logging]
>
> The problem is that the JSON formatted log events needs to be prefixed with
> an API key (outside of the JSON structure). This is possible with Logback,
> but supposedly not with Log4j 2.
> This configuration is arguably a bit strange, but it would be good if Log4j 2
> could support it, since it is likely a relevant use case.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)