# How to start logstash with log4j configuration

**URL:** <https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745>\
**Category:** Logstash\
**Created:** [September 6, 2015, 3:26pm UTC](https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745 "2015-09-06T15:26:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepak1](https://avatars.discourse-cdn.com/v4/letter/d/8dc957/32.png) [@deepak1](https://discuss.elastic.co/u/deepak1)\
**Post date:** [September 6, 2015, 3:26pm UTC](https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745/1 "2015-09-06T15:26:48Z")

</div>

when i am trying to start logstash with log4j configuration i am getting error  
my configuration:-  
input {  
log4j {  
mode =\> "server"  
host =\> "127.0.0.1"  
port =\> 56445  
type =\> "log4j"

}  
}

output {  
stdout {}  
elasticsearch { embedded =\> true }

} .

---

<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:** [September 6, 2015, 6:08pm UTC](https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745/2 "2015-09-06T18:08:12Z")

</div>

Unless you tell us what error you're getting we can't help you. Knowing what version of Logstash you're using would also make things easier and avoid unnecessary speculation.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 6, 2015, 9:20pm UTC](https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745/3 "2015-09-06T21:20:55Z")

</div>

Also, don't use the embedded ES, you're much better off running up a standalone instance.

---

<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, 5:29am UTC](https://discuss.elastic.co/t/how-to-start-logstash-with-log4j-configuration/28745/4 "2017-07-06T05:29:52Z")

</div>


