# How the use the multiline in these situation?

**URL:** <https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388>\
**Category:** Logstash\
**Created:** [August 31, 2016, 5:27am UTC](https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388 "2016-08-31T05:27:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LazyerHong](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@LazyerHong](https://discuss.elastic.co/u/LazyerHong)\
**Post date:** [August 31, 2016, 5:27am UTC](https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388/1 "2016-08-31T05:27:41Z")

</div>

There is logs:  
2016-08-30 04:10:02,104[INFO] HttpRequest[191.1.3.81:33983:null]  
2016-08-30 04:10:02,107[INFO] 用户[10253]，执行[monitor]前状态为：1100000000 [com.cairh.xpe.context.user.interceptor.FlowEngineInterceptor.preHandle(FlowEngineInterceptor.java:185)]  
2016-08-30 04:10:02,108[INFO] HttpResponse[191.1.3.81:33983:null]  
2016-08-30 04:10:02,781[INFO] HttpRequest[191.1.3.81:33985:3D6436C30AFE371A901711F816A3502D]  
2016-08-30 04:10:02,783[INFO] 用户[10574]，执行[getPaginator]前状态为：1121111111 [com.cairh.xpe.context.user.interceptor.FlowEngineInterceptor.preHandle(FlowEngineInterceptor.java:185)]  
2016-08-30 04:10:02,788[INFO] HttpRequest[191.1.3.81:33986:null]  
2016-08-30 04:10:02,792[INFO] HttpResponse[191.1.3.81:33986:null]  
2016-08-30 04:10:02,794[INFO] HttpResponse[191.1.3.81:33985:3D6436C30AFE371A901711F816A3502D]

Now i want to use the multiline to combine the log which have the HttpRequest and HttpResponse and keep the same port.For example:  
2016-08-30 04:10:02,104[INFO] HttpRequest[191.1.3.81:33983:null] \n 2016-08-30 04:10:02,108[INFO] HttpResponse[191.1.3.81:33983:null]

2016-08-30 04:10:02,781[INFO] HttpRequest[191.1.3.81:33985:3D6436C30AFE371A901711F816A3502D] \n 2016-08-30 04:10:02,794[INFO] HttpResponse[191.1.3.81:33985:3D6436C30AFE371A901711F816A3502D]

It look difficult to combine these log，who can help me? Ths

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 31, 2016, 6:16am UTC](https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388/2 "2016-08-31T06:16:25Z")

</div>

This is basically the same question as the one you posed in [How to use the multiline in for these logs](https://discuss.elastic.co/t/how-to-use-the-multiline-in-for-these-logs/59391). Let's keep things in one thread.

---

<div class="post-metadata">

**Author:** ![LazyerHong](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@LazyerHong](https://discuss.elastic.co/u/LazyerHong)\
**Post date:** [August 31, 2016, 6:26am UTC](https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388/3 "2016-08-31T06:26:35Z")

</div>

Thanks！

---

<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:** [July 6, 2017, 4:40am UTC](https://discuss.elastic.co/t/how-the-use-the-multiline-in-these-situation/59388/4 "2017-07-06T04:40:39Z")

</div>


