# Why log4j plugin for logstash is deprecated?

**URL:** <https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033>\
**Category:** Logstash\
**Created:** [May 9, 2017, 8:09am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033 "2017-05-09T08:09:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iknowabc](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@iknowabc](https://discuss.elastic.co/u/iknowabc)\
**Post date:** [May 9, 2017, 8:09am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/1 "2017-05-09T08:09:19Z")

</div>

Hello,

I want to use log4j for my application to write the log via stream mode to logstash by its log4j plugin.  
But from website below:  
[https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-log4j.html)  
it tells "This plugin is deprecated. It is recommended that you use filebeat to collect logs from log4j."

Does anyone know why log4j plugin for logstash is deprecated? I don't want to use log file mode via filebeat ...

Thanks.

---

<div class="post-metadata">

**Author:** ![bertvervaele](https://avatars.discourse-cdn.com/v4/letter/b/8e7dd6/32.png) [@bertvervaele](https://discuss.elastic.co/u/bertvervaele)\
**Post date:** [May 9, 2017, 8:15am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/2 "2017-05-09T08:15:50Z")

</div>

They changed a lot in elastic version 5. Since then some functionalities changed and thats one of them.  
I if you realy want to use log4j you should get an older version.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [May 9, 2017, 8:16am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/3 "2017-05-09T08:16:35Z")

</div>

Have you read [https://www.elastic.co/blog/log4j-input-logstash](https://www.elastic.co/blog/log4j-input-logstash)?

---

<div class="post-metadata">

**Author:** ![iknowabc](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@iknowabc](https://discuss.elastic.co/u/iknowabc)\
**Post date:** [May 9, 2017, 8:23am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/4 "2017-05-09T08:23:56Z")

</div>

Thanks for sharing, is that the key reason behind? This vulnerability only affects Log4j 2.x version before 2.8.2, While 2.8.2 should fix this issue. I still don't know why deprecate this plugin totally instead of fix it.

---

<div class="post-metadata">

**Author:** ![iknowabc](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@iknowabc](https://discuss.elastic.co/u/iknowabc)\
**Post date:** [May 9, 2017, 8:24am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/5 "2017-05-09T08:24:39Z")

</div>

Thanks for the suggestion, but older version seems not maintained anymore.

---

<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:** [June 6, 2017, 8:32am UTC](https://discuss.elastic.co/t/why-log4j-plugin-for-logstash-is-deprecated/85033/6 "2017-06-06T08:32:06Z")

</div>

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