Logstash translate filter throws error if dictionary file is empty


(Riddhesh) #1

When using translate filter with yml file, if I have the file empty, logstash fails to start and throws error:

Pipeline aborted due to error {:pipeline_id=>"main", :exception=>#<RuntimeError: LogStash::Filters::Translate: no implicit conversion of false into Hash when loading dictionary file at filepath

Adding {} in to empty file fixes the error. I wanted to know is this expected and adding {} is correct or not? Also it would help if its documented.