ESIntegTestCase logging configuration


(Zoltan Toth) #1

How can I configure the logging of an ESIntegeTestCase?

Bridging not works via slf4j.
I tried to set a custom ESLoggerFactory with a custom noop ESLogger, no luck.
Loggers.disableConsoleLogging() had no effect.

Is there any way to change the log level of it or turning it off?


(David Pilato) #2

I think you can add a log4j.xml file in src/test/resources and define whichever log level you want there.


(Jason Tedor) #3

Yes. You can use the TestLogging annotation. Alternatively, you can just set the appropriate system property (e.g., "-Des.logger.level=(DEBUG|ERROR|INFO|WARN|TRACE)" for the root logger).


(Zoltan Toth) #4

Thank you, this worked.


(Zoltan Toth) #5

I set the argLine configuration below to the maven surfire plugin but it didn't work:
-ea -server -Des.logger.level=WARN


(system) #6