# Logstash appending new lines even if there is change only in existing line

**URL:** <https://discuss.elastic.co/t/logstash-appending-new-lines-even-if-there-is-change-only-in-existing-line/135220>\
**Category:** Logstash\
**Created:** [June 9, 2018, 10:49am UTC](https://discuss.elastic.co/t/logstash-appending-new-lines-even-if-there-is-change-only-in-existing-line/135220 "2018-06-09T10:49:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yenike\_Raghu\_Ram](https://avatars.discourse-cdn.com/v4/letter/y/7ea924/32.png) [@Yenike\_Raghu\_Ram](https://discuss.elastic.co/u/Yenike_Raghu_Ram)\
**Post date:** [June 9, 2018, 10:49am UTC](https://discuss.elastic.co/t/logstash-appending-new-lines-even-if-there-is-change-only-in-existing-line/135220/1 "2018-06-09T10:49:54Z")

</div>

Say like in original file I ve 2 lines  
a  
b  
We've modified one line say 'a'  
now output file in logstash is like  
a -- original data  
b  
a -- modified data  
b  
I am expecting it to be like log file to have only two lines as with my original log file which has two lines , but with modified data in one of lines  
a -- modified data  
b

Following is my filebeat prospectors and log stash conf

filebeat.prospectors:

- type: log  
paths:
  - directory/\*.html  
output.logstash:  
hosts: ["ipaddress"]

input {  
beats {  
port =\> 5048  
}  
}  
output {  
stdout { codec =\> rubydebug }  
file  
{  
codec =\> line {  
format =\> "%{[message]}"  
}  
path =\> "C:/Program Files/logstash-6.2.3/testPractice/LogsCollected/DebugLog09May2018/OneTwo.html}  
}

Attached original file and log stash file observe that in log stash file for each every change in line all lines are appended

![original](https://us1.discourse-cdn.com/elastic/original/3X/4/2/42384e7f7f4c692b4a790d833f32246e75d8d64e.PNG) ![logstash](https://us1.discourse-cdn.com/elastic/original/3X/e/c/eca0a663036720d39363cf04ccd828df42029227.PNG)

---

<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 7, 2018, 10:49am UTC](https://discuss.elastic.co/t/logstash-appending-new-lines-even-if-there-is-change-only-in-existing-line/135220/2 "2018-07-07T10:49:54Z")

</div>

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