# Log4j2.properties not getting honored?

**URL:** <https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189>\
**Category:** Logstash\
**Created:** [April 3, 2019, 12:16pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189 "2019-04-03T12:16:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![romariol](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@romariol](https://discuss.elastic.co/u/romariol)\
**Post date:** [April 3, 2019, 12:16pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/1 "2019-04-03T12:16:50Z")

</div>

Hi,

I'm getting warning in my logstash-plain logging file regarding (in this case) the logstash.licensechecker.licensereader. The entry is like this:

[2019-04-03T14:12:05,228][WARN][logstash.licensechecker.licensereader] Restored connection to ES instance

However, I want to exclude this from my log file via the log4j2.properties. Raising the level to INFO would also be a possibility. However, when I have the following lines in my log4j2.properties file, it 's still showing in my log file.

logger.licensereader.name = logstash.licensechecker.licensereader  
logger.licensereader.level = info

What am I doing wrong here?

Thanks!

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 3, 2019, 12:18pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/2 "2019-04-03T12:18:25Z")

</div>

If you set the log level to INFO, then it will log anything at INFO or above, which includes WARN.

---

<div class="post-metadata">

**Author:** ![romariol](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@romariol](https://discuss.elastic.co/u/romariol)\
**Post date:** [April 3, 2019, 1:09pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/3 "2019-04-03T13:09:41Z")

</div>

Thanks. Is it also possible to completely disable logging for a plugin? So for lets say the one above?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 3, 2019, 1:13pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/4 "2019-04-03T13:13:23Z")

</div>

Rumour has it you can set the level to OFF.

---

<div class="post-metadata">

**Author:** ![romariol](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@romariol](https://discuss.elastic.co/u/romariol)\
**Post date:** [April 4, 2019, 1:58pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/5 "2019-04-04T13:58:18Z")

</div>

Thanks, it works!

---

<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:** [May 2, 2019, 1:58pm UTC](https://discuss.elastic.co/t/log4j2-properties-not-getting-honored/175189/6 "2019-05-02T13:58:19Z")

</div>

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