# Custom file delimiter

**URL:** <https://discuss.elastic.co/t/custom-file-delimiter/180957>\
**Category:** Logstash\
**Created:** [May 14, 2019, 8:54am UTC](https://discuss.elastic.co/t/custom-file-delimiter/180957 "2019-05-14T08:54:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyb1222](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@tyb1222](https://discuss.elastic.co/u/tyb1222)\
**Post date:** [May 14, 2019, 8:54am UTC](https://discuss.elastic.co/t/custom-file-delimiter/180957/1 "2019-05-14T08:54:51Z")

</div>

I wrote my conf file like this:  
input{  
file{  
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'

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [May 14, 2019, 1:38pm UTC](https://discuss.elastic.co/t/custom-file-delimiter/180957/2 "2019-05-14T13:38:33Z")

</div>

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](https://www.elastic.co/guide/en/logstash/current/logstash-settings-file.html) 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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 11, 2019, 1:38pm UTC](https://discuss.elastic.co/t/custom-file-delimiter/180957/3 "2019-06-11T13:38:43Z")

</div>

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