Skip to content

Commit 233e748

Browse files
nik9000jasontedor
authored andcommitted
HLRC: Forbid all Elasticsearch logging infra (#32784)
All of the Elasticsearch logging infrastructure relies on log4j but we don't want the high level rest client to rely on log4j2. All of its logging goes through commons-logging because our dependencies drag in commons logging already. Anyway, this bans direct use of Elasticsearch's logging infrastructure in the high level REST client. It is still possible to use it indirectly though and there isn't anything we can really do about that until we split the high level rest client from Elasticsearch's server jar.
1 parent 9443165 commit 233e748

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

client/rest-high-level/src/main/resources/forbidden/rest-high-level-signatures.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,14 @@ org.apache.http.entity.ContentType#create(java.lang.String,java.lang.String)
2020
org.apache.http.entity.ContentType#create(java.lang.String,java.nio.charset.Charset)
2121
org.apache.http.entity.ContentType#create(java.lang.String,org.apache.http.NameValuePair[])
2222

23+
@defaultMessage ES's logging infrastructure uses log4j2 which we don't want to force on high level rest client users
24+
org.elasticsearch.common.logging.DeprecationLogger
25+
org.elasticsearch.common.logging.ESLoggerFactory
26+
org.elasticsearch.common.logging.LogConfigurator
27+
org.elasticsearch.common.logging.LoggerMessageFormat
28+
org.elasticsearch.common.logging.Loggers
29+
org.elasticsearch.common.logging.NodeNamePatternConverter
30+
org.elasticsearch.common.logging.PrefixLogger
31+
2332
@defaultMessage We can't rely on log4j2 being on the classpath so don't log deprecations!
2433
org.elasticsearch.common.xcontent.LoggingDeprecationHandler

0 commit comments

Comments
 (0)