# Read xml log files which has no line breaks and everything is written in one single line

**URL:** <https://discuss.elastic.co/t/read-xml-log-files-which-has-no-line-breaks-and-everything-is-written-in-one-single-line/72821>\
**Category:** Logstash\
**Created:** [January 25, 2017, 9:44pm UTC](https://discuss.elastic.co/t/read-xml-log-files-which-has-no-line-breaks-and-everything-is-written-in-one-single-line/72821 "2017-01-25T21:44:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elkinsights](https://avatars.discourse-cdn.com/v4/letter/e/a3d4f5/32.png) [@elkinsights](https://discuss.elastic.co/u/elkinsights)\
**Post date:** [January 25, 2017, 9:44pm UTC](https://discuss.elastic.co/t/read-xml-log-files-which-has-no-line-breaks-and-everything-is-written-in-one-single-line/72821/1 "2017-01-25T21:44:41Z")

</div>

Hi,

I have used mutline filter with other log formats and had no issues and i was able succesffuly parse the and get the output.

But, I have an XML log file that the application is genration and when ever an event happens it is appending the xml fileds to the end of the line and not adding it as part of a new line.

030error message 18141error message 18032error message 110

I need to parse it through logstash.

When i try to use the multiline format to read the log, i dont see it getting through and nothing is getting written as output.

codec =\> multiline {  
pattern =\> "()"  
negate =\> true  
what =\> "previous"  
}

Can you please help me how to overcome this issues through Logstash or filebeat.

---

<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:** [January 27, 2017, 8:14am UTC](https://discuss.elastic.co/t/read-xml-log-files-which-has-no-line-breaks-and-everything-is-written-in-one-single-line/72821/2 "2017-01-27T08:14:18Z")

</div>

I suspect you have to write a custom codec or preprocess the files to add newlines.

---

<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:** [February 24, 2017, 8:14am UTC](https://discuss.elastic.co/t/read-xml-log-files-which-has-no-line-breaks-and-everything-is-written-in-one-single-line/72821/3 "2017-02-24T08:14:53Z")

</div>

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