Custom file delimiter

I wrote my conf file like this:
path => "/data/logs/2"
start_position => "beginning"
delimiter => "\n"
but it didn't work .But when I removed 'delimiter ',It workes well. I should not configred this ?

If I use 'file' to read files in windows , I has configured 'delimiter' to "\r\n". It did not work .
How can I set '\r\n' for 'delimiter'

If you are reading files with native line ending you do not need to use delimiter. On Windows it expects Windows style line endings, on UNIX it expect UNIX.

Also, unless you have configured config.support_escapes in logstash.yml a string like \r\n is not interpreted as escapes. On UNIX, to set delimiter to newline you would use a literal newline

    delimiter => "

Now, on Windows, that would be equivalent to CR+NL :slight_smile:

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.