# Logstash not parsing metadata from logfile

**URL:** <https://discuss.elastic.co/t/logstash-not-parsing-metadata-from-logfile/260496>\
**Category:** Logstash\
**Created:** [January 8, 2021, 4:37am UTC](https://discuss.elastic.co/t/logstash-not-parsing-metadata-from-logfile/260496 "2021-01-08T04:37:04Z")\
**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:** [January 8, 2021, 3:13pm UTC](https://discuss.elastic.co/t/logstash-not-parsing-metadata-from-logfile/260496/2 "2021-01-08T15:13:44Z")

</div>

I would parse each line with a separate pattern

```
grok {
    break_on_match => false
    match => {
        "message => [
            "method: (?<method>[^\n]*)",
            "userId: (?<userId>[^\n]*)",
            "jobId: (?<jobId>[^\n]*)",
            ...
        ]
    }
}
```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-not-parsing-metadata-from-logfile/260496)._
