Skip to content

Commit e4b7b06

Browse files
authored
Reword Suppress a Benign Warning section (#126546)
1 parent 3c29593 commit e4b7b06

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

libs/entitlement/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,16 @@ If the entitlement should or could not be granted (e.g. because the offending co
9292

9393
#### Suppress a benign warning
9494

95-
For a benign `NotEntitledException` that is caught, we probably want to ignore the warning.
96-
Double-check with Core/Infra before embarking on this, because it's a nontrivial amount of work, which goes beyond changes to Elasticsearch and may involve multiple PRs in multiple repos. We want to make sure this is the way to go before spending time on it.
95+
For a benign `NotEntitledException` that is caught, we probably want to suppress (ignore) the warning.
9796

98-
Suppressing the warning involves adding a setting to the `log4j2.properties` files; you can follow [this PR](https://github.com/elastic/elasticsearch/pull/124883) as an example. Use a consistent naming convention, e.g. `logger.entitlements_<plugin_name>.name`. Avoid using extra dots, use `_` instead.
97+
Suppressing the warning involves adding two lines to the `log4j2.properties` files: one specifying the logger name,
98+
and the other specifying the level of `ERROR`, thereby silencing the warning.
99+
Each component has its own `log4j2.properties` file, but they are bundled together by the build process, so make sure to use a globally unique name for each setting you add.
100+
The naming convention is `logger.entitlements_<plugin_name>.name`.
101+
If a plugin needs more than one override, additional suffixes can be added to `<plugin_name>` to distinguish them.
102+
The `<plugin_name>` portion of the name must contain no dots or other punctuation besides underscores.
99103

100-
Each component has its own `log4j2.properties` file. Place the file in `src/main/config`: the build process will take care of bundling the file.
104+
You can follow [this PR](https://github.com/elastic/elasticsearch/pull/124883) as an example.
101105

102106
#### Patching a policy via system properties
103107

0 commit comments

Comments
 (0)