# Log file parsing and ingesting into ES

**URL:** <https://discuss.elastic.co/t/log-file-parsing-and-ingesting-into-es/247806>\
**Category:** Logstash\
**Created:** [September 7, 2020, 7:44pm UTC](https://discuss.elastic.co/t/log-file-parsing-and-ingesting-into-es/247806 "2020-09-07T19:44:03Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [September 7, 2020, 9:14pm UTC](https://discuss.elastic.co/t/log-file-parsing-and-ingesting-into-es/247806/7 "2020-09-07T21:14:09Z")

</div>

If you want to ingest the entire file as one event then use a pattern that does not match.

```
codec => multiline { pattern => "^Spalanzani" negate => true what => "previous" auto_flush_interval => 2 }

```

If you have a variety of xml objects in a file you could try

```
pattern => "^<?xml"
negate => true
what => previous
```

---

_[View the full topic](https://discuss.elastic.co/t/log-file-parsing-and-ingesting-into-es/247806)._
