# Logstash log4j configuration (log input id)

**URL:** <https://discuss.elastic.co/t/logstash-log4j-configuration-log-input-id/124616>\
**Category:** Logstash\
**Created:** [March 19, 2018, 5:26pm UTC](https://discuss.elastic.co/t/logstash-log4j-configuration-log-input-id/124616 "2018-03-19T17:26:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)\
**Post date:** [March 19, 2018, 5:26pm UTC](https://discuss.elastic.co/t/logstash-log4j-configuration-log-input-id/124616/1 "2018-03-19T17:26:04Z")

</div>

Hello,  
I have pipelines with dozen of inputs/filters  
For some jdbc input, i meet errors :

> [2018-03-19T13:19:00,524][ERROR][logstash.inputs.jdbc] Unable to connect to database. Tried 1 times {:error\_message=\>"Java::JavaSql::SQLRecoverableException: IO Error: The Network Adapter could not establish the connection"}

Every input{} in the logstash conf files have id

> input { jdbc {id =\> "my\_input\_id"

Is there a way to configure log4j to have this id shown in logstash log  
Something like

> [2018-03-19T13:19:00,524][ERROR][logstash.inputs.jdbc my\_input\_id]....

---

<div class="post-metadata">

**Author:** ![franck.lefebure](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franck.lefebure/32/24332_2.png) [@franck.lefebure](https://discuss.elastic.co/u/franck.lefebure)\
**Post date:** [March 20, 2018, 2:27pm UTC](https://discuss.elastic.co/t/logstash-log4j-configuration-log-input-id/124616/2 "2018-03-20T14:27:06Z")

</div>

I've dug in logstash sources. If I'm not mistaken, its not possible.  
I will try to implement it.

---

<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:** [April 17, 2018, 2:27pm UTC](https://discuss.elastic.co/t/logstash-log4j-configuration-log-input-id/124616/3 "2018-04-17T14:27:32Z")

</div>

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