# Turn off ES deprecation Logs Dynamically

**URL:** <https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948>\
**Category:** Elasticsearch\
**Created:** [March 3, 2020, 10:09pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948 "2020-03-03T22:09:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [March 3, 2020, 10:09pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/1 "2020-03-03T22:09:18Z")

</div>

I know there is a way to turn off deprecation logs via static config as documented here: [https://www.elastic.co/guide/en/elasticsearch/reference/6.7/logging.html#deprecation-logging](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/logging.html#deprecation-logging)

However, I wasn't sure if there is a dynamic configuration that does NOT require a cluster restart (rolling or a full restart) that disables logging for ES deprecation logs. It generates about 15G of logs on every host in the cluster. Its painful.

Please let me know. Thank you.

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [March 3, 2020, 10:31pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/2 "2020-03-03T22:31:22Z")

</div>

Update:

It looks like I might have found the solution. I should have waited for a bit more before posting the question. I googled this question and I didn't find a good answer anywhere. So, I hope this helps others.

```
curl -X PUT "localhost:9200/_cluster/settings?flat_settings=true&pretty" -H 'Content-Type: application/json' -d'
{
    "transient" : {
        "logger.org.elasticsearch.deprecation": "ERROR"
    }
}'
```

---

<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:** [March 4, 2020, 7:00am UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/4 "2020-03-04T07:00:46Z")

</div>

Turning them off may cause you issues in the future if you try and upgrade without turning them back on first.

Are you seeing lots of duplicate messages? If so, can you share examples? Elasticsearch should be deduplicating these logs to keep the volume under control, so maybe there's a bug here.

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [March 4, 2020, 8:41pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/5 "2020-03-04T20:41:31Z")

</div>

> [@DavidTurner](#):
>
> these logs to keep the volume under control, so maybe there's a bug

Thanks David. That's a good point. We are only disabling this in production. Our beta has deprecation logs enabled. They are all the same logs. See an example log below.

```
[2020-03-02T22:21:15,295][WARN][o.e.d.c.ParseField] Deprecated field [_version] used, expected [version] instead
[2020-03-02T22:21:15,295][WARN][o.e.d.c.ParseField] Deprecated field [_version_type] used, expected [version_type] instead
[2020-03-02T22:21:15,296][WARN][o.e.d.c.ParseField] Deprecated field [_version] used, expected [version] instead
[2020-03-02T22:21:15,296][WARN][o.e.d.c.ParseField] Deprecated field [_version_type] used, expected [version_type] instead
[2020-03-02T22:22:00,181][WARN][o.e.d.c.ParseField] Deprecated field [_version] used, expected [version] instead
[2020-03-02T22:22:00,182][WARN][o.e.d.c.ParseField] Deprecated field [_version_type] used, expected [version_type] instead
[2020-03-02T22:22:00,182][WARN][o.e.d.c.ParseField] Deprecated field [_version] used, expected [version] instead
[2020-03-02T22:22:00,182][WARN][o.e.d.c.ParseField] Deprecated field [_version_type] used, expected [version_type] instead

```

---

<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:** [March 4, 2020, 9:18pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/6 "2020-03-04T21:18:48Z")

</div>

Thanks, that helps. I opened [https://github.com/elastic/elasticsearch/issues/53137](https://github.com/elastic/elasticsearch/issues/53137).

---

<div class="post-metadata">

**Author:** ![animageofmine](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@animageofmine](https://discuss.elastic.co/u/animageofmine)\
**Post date:** [March 4, 2020, 10:53pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/7 "2020-03-04T22:53:43Z")

</div>

Glad it helped. Makes so much sense to dedup the logs. Thanks for pushing out the bugfix.

---

<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:** [April 1, 2020, 11:00pm UTC](https://discuss.elastic.co/t/turn-off-es-deprecation-logs-dynamically/221948/8 "2020-04-01T23:00:39Z")

</div>

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