logstash-plugins / logstash-input-gelf

Apache License 2.0
20 stars 39 forks source link

short_message should be remapped even if it is empty #50

Open kongslund opened 7 years ago

kongslund commented 7 years ago

When receiving a GELF event with an empty short_message and no full_message then it does not get remapped as expected. This is a consequence of PR #18 by @ggtools.

Removing the && !event.get("short_message").empty?-part would fix it.

input {
  gelf {
    port => 12201
    type => "gelf"
  }
}
output {
  stdout { codec => rubydebug }
}
{
  "version": "1.1",
  "host": "example.org",
  "short_message": "",
  "timestamp": 1385053862.3072,
  "level": 1,
  "_user_id": 9001,
  "_some_info": "foo",
  "_some_env_var": "bar"
}