elastic / elastic/logstash

Log Errors when Event.set() fails?

Open
#7,869 2 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
Java
Stars
14.9k
Forks
3.5k
Avg merge
19h 14m
Merged PRs (30d)
63

Description

Coming from https://github.com/elastic/logstash/pull/7730#issuecomment-319444677 and related discussion.

Currently, we're swallowing the following situation quietly.

Set a list of some values, say `["one", "two", "three"]` at `"[foo][bar]"`.

Calling `event.set("[foo][bar][3]", "four")` works fine and sets the value as expected.
Calling `event.set("[foo][bar][strrrring]", "four")` doesn't do anything and the call is quietly ignored, hiding potential issues.

I think we should log a clear `ERROR` level line stating that setting a value for `"[foo][bar][strrrring]"` did not work because `"[foo][bar]"` is a list to give users visibility on the problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.