File input containing a path with leading or trailing whitespace does not watch file

Description

The following is an example of a file input plugin configuration that contains a filename with a trailing whitespace character:

I have attached a simple patch file to apply to lib/logstash/inputs/file.rb that logs a warning if the path contains leading or trailing whitespace. I found this after a typo and banging my head against the wall for about 15 minutes!!

I choose to log a warning vs raising an exception. One could argue that an exception should be raised here as well.

Assignee

Logstash Developers

Reporter

MattV

Labels

Affects versions

Configure