-
Notifications
You must be signed in to change notification settings - Fork 46
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
Additional fields Elasticsearch #27
Comments
@thilankadileepa You can use Also, |
Thanks a lot. To use the JacksonJsonLayout:VirtualProperty, what is the library that I should use ? or org.appenders.log4j log4j2-elasticsearch-core 1.3.5Please note that I have ES version 7. Best Regards, |
@thilankadileepa It's not released yet (not available in 1.3.5). It will be available as part of 1.4 Core later this year. |
Can I build it by myself and use ? |
Yes, you can build your own fork if you can't wait for the release. If you don't want to maintain your own fork internally, |
Thanks I have build it and add the following dependancy My log4j2.xml looks similar to the example. I am getting the following error on startup.
|
Use |
Thank You :)
|
It caused by latest Jest jars. It will work once you remove dependency on Other option is to switch to |
Finally I managed to do that :) |
Great news! Glad to help! :) Feel free to close this issue if you feel that everything was addressed. |
Final Question How can I add this dynamically per each request ? For example a session id for each transaction ? |
Try using
Options available in the |
Thanks :) |
This is the way that I can add logs in to Elasticsearch
{
"_index" : "log4j2",
"_type" : "index",
"_id" : "JpTcx20Bt2rAkaoY4EfT",
"_score" : 1.0,
"_source" : {
"timeMillis" : 1571016201881,
"loggerName" : "Test",
"level" : "INFO",
"message" : "Test Message",
"thread" : "main"
}
}
I want to add a new field as sessionId
I have gone through all the available contents in the web and the source code but could not locate the way to do that.
Is it possible to share an example where I can do this ?
The text was updated successfully, but these errors were encountered: