Mute deprecation warns

Hello,

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

Anybody?

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" : {
        "logger.com.full.java.package.class": "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 logger.com.full.java.package.class 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.