Disable logging on the JAVA transport client

Hi,

I'm trying to disable logging on the JAVA client, so I don't have the below outputting.

INFO: [Stone] modules [], plugins [], sites []
INFO: [Alchemy] modules [], plugins [], sites []

I've tried setting Log4jESLoggerFactory.getLogger("discovery").setLevel("WARN");

Is there a switch for this?

Thanks

Turns out the below works

Log4jESLoggerFactory.getLogger("").setLevel("WARN");

If you are using Log4J, you could also simply do that with some configuration.

Like add a log4j2.xml in your classpath:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="info" monitorInterval="5">
	<Appenders>
		<Console name="Console" target="SYSTEM_OUT">
			<PatternLayout pattern="%d{HH:mm:ss.SSS} [%-5level] %C{1.} - %msg%n" />
		</Console>
	</Appenders>
	<Loggers>
        <Logger name="org.elasticsearch" level="error"/>
	<Root level="info">
		<AppenderRef ref="Console" />
	</Root>
	</Loggers>
</Configuration>

This is what I'm doing here: https://github.com/dadoonet/legacy-search/blob/01-direct/src/main/resources/log4j2.xml