-
Notifications
You must be signed in to change notification settings - Fork 81
Return ContentType of "application/json" instead of "text/plain" #90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…tractStringLayout's getContentType() that returns a more ECS appropriate 'application/json'
💚 CLA has been signed |
Hi, I signed the "Contributor Agreement", any idea how I can get the checks to run again? |
I have re-run the check. All good now! |
Looks like the Jenkins job failed because I placed the function in the nested .Builder class instead of the ecslayout class, |
Looks like the maven build is failing now because of connectivity issues? |
I ran the tests again and now it succeeded. Seemed to be a transient networking issue. |
@felixbarny, thanks for all the help! When can i expect to see a new release with this fix? |
Override the ECSLayout parent class's (org.apache.logging.log4j.core.layout.AbstractStringLayout line 222) "getContentType()" function which always returns
text/plain
, so that it returns the ECS-appropriateapplication/json
instead.This change adds support for use of the ECS Layout in conjunction with the log4j2 HTTP #Appender
Usage of the layout's "getContentType()" function can be seen on line 89 of the HttpURLConnectionManager class, in the "send()" function ,which decides the
Content-Type
header the logs will be sent with.This PR is to help close #89