# ESIntegTestCase logging configuration

**URL:** <https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640>\
**Category:** Elasticsearch\
**Created:** [December 8, 2015, 2:18pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640 "2015-12-08T14:18:16Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoltan](https://avatars.discourse-cdn.com/v4/letter/z/ad7895/32.png) [@zoltan](https://discuss.elastic.co/u/zoltan)\
**Post date:** [December 8, 2015, 2:18pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/1 "2015-12-08T14:18:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 8, 2015, 2:42pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/2 "2015-12-08T14:42:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [December 8, 2015, 2:58pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/3 "2015-12-08T14:58:52Z")

</div>

> [@zoltan](#):
>
> Is there any way to change the log level of it or turning it off?

Yes. You can use the [TestLogging annotation](https://github.com/elastic/elasticsearch/blob/c6938896aa59624dcdb57c89253ad3de3e165f17/test-framework/src/main/java/org/elasticsearch/test/junit/annotations/TestLogging.java). Alternatively, you can just set the appropriate system property (e.g., "-Des.logger.level=(DEBUG|ERROR|INFO|WARN|TRACE)" for the root logger).

---

<div class="post-metadata">

**Author:** ![zoltan](https://avatars.discourse-cdn.com/v4/letter/z/ad7895/32.png) [@zoltan](https://discuss.elastic.co/u/zoltan)\
**Post date:** [December 8, 2015, 4:47pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/4 "2015-12-08T16:47:03Z")

</div>

Thank you, this worked.

---

<div class="post-metadata">

**Author:** ![zoltan](https://avatars.discourse-cdn.com/v4/letter/z/ad7895/32.png) [@zoltan](https://discuss.elastic.co/u/zoltan)\
**Post date:** [December 8, 2015, 4:49pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/5 "2015-12-08T16:49:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:32pm UTC](https://discuss.elastic.co/t/esintegtestcase-logging-configuration/36640/6 "2017-07-05T23:32:34Z")

</div>


