# Filebeat multiline pattern with negate works for all logs even without pattern

**URL:** <https://discuss.elastic.co/t/filebeat-multiline-pattern-with-negate-works-for-all-logs-even-without-pattern/179942>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [May 7, 2019, 11:06am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern-with-negate-works-for-all-logs-even-without-pattern/179942 "2019-05-07T11:06:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrvin](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@andrvin](https://discuss.elastic.co/u/andrvin)\
**Post date:** [May 7, 2019, 11:06am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern-with-negate-works-for-all-logs-even-without-pattern/179942/1 "2019-05-07T11:06:23Z")

</div>

Hi! I want to use multiline for Java stacktraces. I use following configuration:

```
- type: docker
  multiline:
    pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
    negate: true
    match: after

```

It works fine for java logs, but it also concatenates nginx logs and my golang application logs (that's definitely not what I need).  
I can't figure out why it is works that way. I checked it on the Golang Playground [https://play.golang.org/p/uAd5XHxscu](https://play.golang.org/p/uAd5XHxscu) and it seems correct.  
Filebeat should concatenate strings after the negate pattern and before the next one, shouldn't it? But it concatenates everything, ignoring the pattern.

---

<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:** [June 4, 2019, 11:06am UTC](https://discuss.elastic.co/t/filebeat-multiline-pattern-with-negate-works-for-all-logs-even-without-pattern/179942/2 "2019-06-04T11:06:45Z")

</div>

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