Graylog2 / Graylog2/graylog2-server
Sync behaviour of GELF plugin and Graylog (re: has empty mandatory "short_message")
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
My setup: Logstash -> GELF -> Graylog 2.4.6
Some of my logfiles contain lines with only whitspace characters (TAB + end of line). This leads to lots of "has empty mandatory "short_message" field" Exceptions in Graylog.
imho this is a bug, because there _is_ a message (the TAB character). GelfCodec.java has this line here:
```
if (StringUtils.isBlank(shortMessageNode.asText()) && StringUtils.isBlank(messageNode.asText())) {
throw new IllegalArgumentException(prefix + "has empty mandatory \"short_message\" field.");
}
```
Would it make sense to change StringUtils.isBlank() to StringUtils.isEmpty()
If not, I would appreciate to sync the behaviour of the GELF Plugin and the GelfCodec in Graylog. I mean, why send messages to Graylog if it rejects it anyway?
Contributor guide
Assessment
This issue has not been assessed yet.