# Logstash is not reading the last line if EOL character is not found

**URL:** https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992
**Category:** Logstash
**Created:** [May 2, 2016, 7:03pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992 "2016-05-02T19:03:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![asureshkumaran](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@asureshkumaran](https://discuss.elastic.co/u/asureshkumaran)
#### Post date: [May 2, 2016, 7:03pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992/1 "2016-05-02T19:03:57Z")

</div>

I noticed logstash is not reading the last line if EOL character is not present. Here is my configuration. Please help to resolve the issue.

input {   
file {  
path =\> "C:/temp/file/test/\*.txt"  
start\_position =\> "beginning"   
sincedb\_path =\> "C:/Users/null"  
ignore\_older =\> 0  
}  
}

filter {  
mutate {  
gsub =\> [  
"message", "[\r]", ""  
]   
}   
}

output {

```
stdout {codec => rubydebug }  

```

}

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [May 8, 2016, 6:54pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992/2 "2016-05-08T18:54:10Z")

</div>

Well, that's just how the file input works. It always waits for complete lines.

---

<div class="post-metadata">

### Author: ![asureshkumaran](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@asureshkumaran](https://discuss.elastic.co/u/asureshkumaran)
#### Post date: [May 9, 2016, 12:42pm UTC](https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992/3 "2016-05-09T12:42:58Z")

</div>

Thanks magnusbaeck.

---

<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: [July 6, 2017, 4:58am UTC](https://discuss.elastic.co/t/logstash-is-not-reading-the-last-line-if-eol-character-is-not-found/48992/4 "2017-07-06T04:58:32Z")

</div>


