# Log4j directly to elastic search

**URL:** <https://discuss.elastic.co/t/log4j-directly-to-elastic-search/4124>\
**Category:** Elasticsearch\
**Created:** [March 17, 2011, 7:38pm UTC](https://discuss.elastic.co/t/log4j-directly-to-elastic-search/4124 "2011-03-17T19:38:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_Diephouse](https://avatars.discourse-cdn.com/v4/letter/d/779978/32.png) [@Dan\_Diephouse](https://discuss.elastic.co/u/Dan_Diephouse)\
**Post date:** [March 17, 2011, 7:38pm UTC](https://discuss.elastic.co/t/log4j-directly-to-elastic-search/4124/1 "2011-03-17T19:38:38Z")

</div>

Perhaps I haven't spotted it, but is there a way to post log messages  
directly to elasticsearch from log4j? We have a whole flume setup  
working, but that's really annoying to set up for people who are  
writing code on their local machines. I figured if I could just have  
log4j write directly to elasticsearch, we could make things easier for  
our devs.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [March 17, 2011, 7:41pm UTC](https://discuss.elastic.co/t/log4j-directly-to-elastic-search/4124/2 "2011-03-17T19:41:20Z")

</div>

No, there isn't, but, an elasticsearch log4j appender would be cool. if you write one, I think it can even be in the base jar of "core" elasticsearch (as the code will probably be simple).  
On Thursday, March 17, 2011 at 9:38 PM, Dan Diephouse wrote:

> Perhaps I haven't spotted it, but is there a way to post log messages  
> directly to elasticsearch from log4j? We have a whole flume setup  
> working, but that's really annoying to set up for people who are  
> writing code on their local machines. I figured if I could just have  
> log4j write directly to elasticsearch, we could make things easier for  
> our devs.

---

<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 6, 2017, 4:09am UTC](https://discuss.elastic.co/t/log4j-directly-to-elastic-search/4124/3 "2017-07-06T04:09:44Z")

</div>


