HighLevelRestClient log4j configuration

Hi. New to Elasticsearch and have a question about logging in the HighLevelRestClient.

I wrote a java client that uses the Rest Client but everytime I crank it up to insert records into Elasticsearch I get the following error:

Initialize RestHighLevelClient [localhost] port [9200]
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.

The logging then defaults to 'debug' and I get lots of logging output. I would like to be able to change the log level.
I have logging in my own code and here is the relevant log4j configuration:

Here are the basics:

On version: elasticsearch-6.2.3
Maven/Rest version build:

org.elasticsearch.client elasticsearch-rest-high-level-client 6.2.3

Does anyone know how to change the log level in the HighLevelRestClient code?

The markup hide this:
logger name="org.elasticsearch"
level value="FATAL"
logger

After messing around, I've learned that the RestClient picks up the log level in my defined Log4j file. Doh.

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