# How to log all search request to es

**URL:** https://discuss.elastic.co/t/how-to-log-all-search-request-to-es/149005
**Category:** Elasticsearch
**Created:** [September 18, 2018, 4:25pm UTC](https://discuss.elastic.co/t/how-to-log-all-search-request-to-es/149005 "2018-09-18T16:25:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wangqinghuan](https://avatars.discourse-cdn.com/v4/letter/w/d26b3c/32.png) [@wangqinghuan](https://discuss.elastic.co/u/wangqinghuan)
#### Post date: [September 18, 2018, 4:25pm UTC](https://discuss.elastic.co/t/how-to-log-all-search-request-to-es/149005/1 "2018-09-18T16:25:58Z")

</div>

hi , i want to record all elasticsearch access log contains request body so that i can find those incorrect request. Does elasticsearch have any support?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [September 20, 2018, 12:19pm UTC](https://discuss.elastic.co/t/how-to-log-all-search-request-to-es/149005/2 "2018-09-20T12:19:26Z")

</div>

you could use the [search slow log](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/index-modules-slowlog.html#search-slow-log) in combination with a `0` threshold

Note that this will log all those requests to all shards.

---

<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: [October 18, 2018, 12:19pm UTC](https://discuss.elastic.co/t/how-to-log-all-search-request-to-es/149005/3 "2018-10-18T12:19:42Z")

</div>

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