How to ignore default fields
See original GitHub issueHi,
could you please document, how default fields could be ignored? For me, there is no use for these default fields: logger_name, thread_name, level, level_value, HOSTNAME and I want to get rid of them.
The single-word names are ignored by just <level>[ignore]</level>
(as documented) but the two-word names are not so obvious. By little experimenting, I found almost all keys
logger_name = logger, thread_name = thread, level_value = levelValue
but I am not able to find out correct key for HOSTNAME
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8
Top Results From Across the Web
How to ignore default fields · Issue #98 - GitHub
However, if you are removing all the default fields, I would suggest using the composite encoder instead of the LogstashEncoder . The composite ......
Read more >Exclude 'default'/'system' fields in `table *` - Splunk Community
Does anyone know if there's a way to exclude them without naming them all individually via a built in method/variable? e.g. `index=myindex | ......
Read more >Ignore default field values for JSON deserialization
Try creating a @JsonSetter for that field public class Dto { private name = "test"; @JsonSetter("name") public void nameJsonSetter(String ...
Read more >Remove or disable default fields - Elasticsearch - Elastic Discuss
Hi i want to know that if we can remove default fields or not in elasticsearch i mean : "_index" : "iislogs", "_type"...
Read more >Remove default fields and add New | WordPress.org
Hi, I am using a theme, which uses cmb2 and WPJobBoard Plugin, There are some default fields under custom post type job listing....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks jama707, your last reply was pretty helpful, and yes, there should be consistency. Now, this works:
logger_name, version, thread_name, level, level_value
are not in the MDC.To disable those, you’ll need to set their field names to
[ignore]
as mentioned hereI’ve never seen
logs.home
before, so I’m not sure where that is coming from.However, if you are removing all the default fields, I would suggest using the composite encoder instead of the
LogstashEncoder
. The composite encoders allow you to selectively add things as needed (rather than removing things).