# How can i specify the end of logs

**URL:** <https://discuss.elastic.co/t/how-can-i-specify-the-end-of-logs/24704>\
**Category:** Logstash\
**Created:** [July 1, 2015, 10:00am UTC](https://discuss.elastic.co/t/how-can-i-specify-the-end-of-logs/24704 "2015-07-01T10:00:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oussama](https://avatars.discourse-cdn.com/v4/letter/o/e9a140/32.png) [@oussama](https://discuss.elastic.co/u/oussama)\
**Post date:** [July 1, 2015, 10:00am UTC](https://discuss.elastic.co/t/how-can-i-specify-the-end-of-logs/24704/1 "2015-07-01T10:00:51Z")

</div>

```
    0
    down vote

    favorite

```

I wanna know how can i specify the end of logs.

this is my logs :

message = state:this is a sate,client\_name:user

And my match is :

match =\> ["message", "%{DATA:dataAfterClientName},client\_name:%{DATA:client\_name}"]

in the résult i can see juste the dataAfterClientName = state:this is a sate but i don't get the client\_name value.

Any help please

---

<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:** [July 1, 2015, 10:12am UTC](https://discuss.elastic.co/t/how-can-i-specify-the-end-of-logs/24704/2 "2015-07-01T10:12:40Z")

</div>

Avoid using the DATA pattern. In your case it's probably matching too much. In this particular case I'd try using the [kv filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-kv.html) instead of grok.

---

<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, 5:35am UTC](https://discuss.elastic.co/t/how-can-i-specify-the-end-of-logs/24704/3 "2017-07-06T05:35:51Z")

</div>


