# "Bad Request" loggued with debug level?

**URL:** <https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230>\
**Category:** Elasticsearch\
**Created:** [February 4, 2021, 10:23am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230 "2021-02-04T10:23:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 4, 2021, 10:23am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230/1 "2021-02-04T10:23:18Z")

</div>

I have to set log level DEBUG to see Bad Request error:

```auto
{"type": "server", "timestamp": "2021-02-04T10:19:16,959Z", "level": "DEBUG", "component": "r.suppressed", "cluster.name": "conso", "node.name": "conso-es-client-0", "message": "path: /_index_template/conso, params: {name=conso}", "cluster.uuid": "2YaiBtXgQMqyDdNJgWecFg", "node.id": "BzJq_ehNSo-5kH1ugwWrlw" ,
"stacktrace": ["org.elasticsearch.common.xcontent.XContentParseException: [1:1] [index_template] Expected START_OBJECT but was: VALUE_STRING",

```

is it normal?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 4, 2021, 10:54am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230/2 "2021-02-04T10:54:15Z")

</div>

Yes, that's normal. These errors are returned to the client with the expectation that it's the client's job to deal with them, so there's little point in filling the server logs with them too.

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [February 9, 2021, 8:15am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230/3 "2021-02-09T08:15:54Z")

</div>

woa, I see plenty of errors now from our prod clusters 😕

But too many logs now, is it possible to see only client errors without all debug logs?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [February 9, 2021, 8:32am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230/4 "2021-02-09T08:32:11Z")

</div>

You can [set specific loggers](https://www.elastic.co/guide/en/elasticsearch/reference/current/logging.html#configuring-logging-levels) to `DEBUG`; the logger for the message you quote above is `rest.suppressed` which might be enough for you. I still recommend against using the server logs for investigating client errors, it's much better to deal with these on the client. For instance, the server logs won't identify the specific client that triggered the error, nor do they record errors returned to clients by other means (e.g. from a proxy, maybe also security failures don't appear here).

---

<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:** [March 9, 2021, 8:32am UTC](https://discuss.elastic.co/t/bad-request-loggued-with-debug-level/263230/5 "2021-03-09T08:32:31Z")

</div>

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