# When I use OR condition in multiline.pattern each line comes in a separate message

**URL:** <https://discuss.elastic.co/t/when-i-use-or-condition-in-multiline-pattern-each-line-comes-in-a-separate-message/233639>\
**Category:** Elasticsearch\
**Created:** [May 21, 2020, 1:20am UTC](https://discuss.elastic.co/t/when-i-use-or-condition-in-multiline-pattern-each-line-comes-in-a-separate-message/233639 "2020-05-21T01:20:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebisada](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@ebisada](https://discuss.elastic.co/u/ebisada)\
**Post date:** [May 21, 2020, 1:20am UTC](https://discuss.elastic.co/t/when-i-use-or-condition-in-multiline-pattern-each-line-comes-in-a-separate-message/233639/1 "2020-05-21T01:20:24Z")

</div>

When I use OR condition in multiline.pattern each line comes in a separate message:

When I use the following lines, I can successfully parse multiple line logs starting with [INFO], [ERROR] or [DEBUG]:  
multiline.pattern: '^['  
multiline.negate: true  
multiline.match: after

When I use the following lines, I can successfully parse multiple line starting with Exception:  
multiline.pattern: '^Exception\b'  
multiline.negate: true  
multiline.match: after

When I merge the two expressions with |, as follows, I mistakenly get each log line sent as a separate message:  
multiline.pattern: '^[\|^Exception\b'  
multiline.negate: true  
multiline.match: after

In the last pattern, I tried multiline.negate: true and multiline.negate: false and I had the issue with both options.

---

<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 18, 2020, 1:20am UTC](https://discuss.elastic.co/t/when-i-use-or-condition-in-multiline-pattern-each-line-comes-in-a-separate-message/233639/2 "2020-06-18T01:20:26Z")

</div>

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