Re: Logging to Datadog

2021-11-27 Thread Matt Sicker
How about the header and footer options of appenders? Matt Sicker > On Nov 27, 2021, at 12:30, Ralph Goers wrote: > > I’ve updated the Jira with a second option of enhancing the PatternLayout > which I like better. > > I will say that I find what DataDog is doing here to be strange. I don’t

Re: Logging to Datadog

2021-11-27 Thread Ralph Goers
I’ve updated the Jira with a second option of enhancing the PatternLayout which I like better. I will say that I find what DataDog is doing here to be strange. I don’t understand why Datadog doesn’t support passing the API key as a credential on the socket connection instead of validating

Re: Logging to Datadog

2021-11-27 Thread Ralph Goers
https://github.com/logfellow/logstash-logback-encoder#prefixsuffixseparator explains that the prefix and suffix are before the JSON starts. This would be incredibly easy to implement as: https://issues.apache.org/jira/browse/LOG4J2-3197 > > I think that the API key prefix is outside of

Re: Logging to Datadog

2021-11-27 Thread Mikael Ståldal
JIRA issue created: https://issues.apache.org/jira/browse/LOG4J2-3197 I think that the API key prefix is outside of the JSON, so the end result is not proper JSON. I suppose that the Datadog service will pre-parse the received event to extract the API key, and then parse the rest as JSON.

Re: Logging to Datadog

2021-11-27 Thread Volkan Yazıcı
Thanks for the heads up Mikael! I am pretty sure JSON Template Layout can suffice this goal – if it can't, I will make sure it can. From the Datadog documentation you have shared , the expected JSON structure is not clear. They have used

Logging to Datadog

2021-11-27 Thread Mikael Ståldal
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.