# Parsing multiple log format in same file

**URL:** https://discuss.elastic.co/t/parsing-multiple-log-format-in-same-file/179825
**Category:** Logstash
**Created:** [May 6, 2019, 5:41pm UTC](https://discuss.elastic.co/t/parsing-multiple-log-format-in-same-file/179825 "2019-05-06T17:41:31Z")
**Posts on this page:** 1
**Showing post:** 2

<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 6, 2019, 6:40pm UTC](https://discuss.elastic.co/t/parsing-multiple-log-format-in-same-file/179825/2 "2019-05-06T18:40:50Z")

</div>

This [thread](https://discuss.elastic.co/t/how-to-handle-metadata-in-file-headers/167544) has an example of doing that. Note that it requires "--pipeline.workers 1", so it does not scale, and using class variables can be fragile, but it does the job.

---

_[View the full topic](https://discuss.elastic.co/t/parsing-multiple-log-format-in-same-file/179825)._
