# Reference Previous loglines

**URL:** <https://discuss.elastic.co/t/reference-previous-loglines/62257>\
**Category:** Logstash\
**Created:** [October 5, 2016, 10:49am UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257 "2016-10-05T10:49:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![debarun](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@debarun](https://discuss.elastic.co/u/debarun)\
**Post date:** [October 5, 2016, 10:49am UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257/1 "2016-10-05T10:49:08Z")

</div>

HI,  
Is it possible to to reference a previous loglines other than using multiline to club them togethers.

Also could we use multiline in an if else loop to make sure lines correspondig to a specific event are clubbed together?

Regards,  
Debarun

---

<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:** [October 5, 2016, 11:10am UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257/2 "2016-10-05T11:10:32Z")

</div>

> Is it possible to to reference a previous loglines other than using multiline to club them togethers.

Apart from the multiline codec/filter and the aggregate filter... not really.

> Also could we use multiline in an if else loop to make sure lines correspondig to a specific event are clubbed together?

Not sure what you mean here.

---

<div class="post-metadata">

**Author:** ![debarun](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@debarun](https://discuss.elastic.co/u/debarun)\
**Post date:** [October 7, 2016, 12:06pm UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257/3 "2016-10-07T12:06:19Z")

</div>

Hi,

It might be that the loglines all start with date, but the lines 3 such loglines correspond to a specific event, and I want to tag that.

Is it possible?

Regards,  
debarun.

---

<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:** [October 7, 2016, 12:15pm UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257/4 "2016-10-07T12:15:00Z")

</div>

I don't think there's a simple way of doing that with the standard plugins.

---

<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:35am UTC](https://discuss.elastic.co/t/reference-previous-loglines/62257/5 "2017-07-06T04:35:15Z")

</div>


