Mute deprecation warns


I am trying to mute DEPRECATION warning in the logs but doing it via _cluster/settings is not working.

Log to mute

[2021-12-10T09:14:32,563][DEPRECATION][o.o.d.c.m.IndexNameExpressionResolver] [opensearch-replica-master-1] this request accesses system indices: [.opendistro_security, .tasks], but in a future major version, direct access to system indices will be prevented by default
PUT /_cluster/settings
  "persistent" : {
    "logger.deprecation.level" : "ERROR"

I followed the docs Logs - OpenSearch documentation

Any advice?

Thanks in advance

Still waiting for a fix in 1.2.3


When on ElasticSearch I had a huge number of log lines firing that were not useful. While not deprecation specific, you might try this:

PUT _cluster/settings?flat_settings=true&pretty
    "transient" : {
        "": "ERROR"

You have to put in the full Java pacakge and class path, and what you showed is just the shortened version. From quickly searching the source, it looks like the full path should be something like:
org.opensearch.cluster.metadata.IndexNameExpressionResolver , however there is an extra d in the shortening. Maybe deprecation?

Thanks @jbolle

I tried with with no luck. Still getting those useless deprecation messages.

If that is what you put in the rest command then I wouldn’t expect it to work. You need to put the full class name of the logger. However its difficult to exactly determine what that class name is because the logger is using the dot shortening.