Skip to content
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

"object" data type for properties #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PeterFokkinga
Copy link

@PeterFokkinga PeterFokkinga commented Aug 23, 2018

useful when the property contains JSON data, for example a serialized object like a Map; it saves you the trouble create a pipeline with a JSON processor in Elastic

example:

<property>
 <name>params</name>
 <value>%mdc{httpParameters}</value>
 <type>object</type>
 <allowEmpty>false</allowEmpty>
</property>

with the following in a Filter or Servlet
MDC.put("httpParameters", new GsonBuilder().create().toJson(request.getParameterMap()));

useful when the property contains JSON data, for example a serialized object like a Map; it saves you the trouble create a pipeline with a JSON processor in Elastic

example:
<property>
 <name>params</name>
 <value>%mdc{httpParameters}</value>
 <type>object</type>
 <allowEmpty>false</allowEmpty>
</property>

with the following in a Filter or Servlet
MDC.put("httpParameters", new GsonBuilder().create().toJson(request.getParameterMap()));
cgoIT added a commit to cgoIT/logback-elasticsearch-appender that referenced this pull request Jun 22, 2020
btsweber pushed a commit to SeaStreetTechnologies/logback-elasticsearch-appender that referenced this pull request Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant