-
Notifications
You must be signed in to change notification settings - Fork 77
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
Allow subclasses to insert custom fields #151
Conversation
Protected method that subclasses can override to insert arbitrary custom fields in the logback encoder. elastic#147
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
/test |
Thank you! |
Hello , I need exactly the same functionality. Allthough i can't get my custom EcsEncoder extension class to work with spring boot and logback. Many thanks |
Yes you just create a class that extends EcsEncoder and override the addCustomFields method to add in whatever you need. Then you use it by defining your own custom appender - you can copy from ecs-console-appender.xml or ecs-file-appender.xml and change the appender name and encoder class. So a full
|
Hello , |
Protected method that subclasses can override to insert arbitrary custom fields in the logback encoder. #147