# Help with org.xbib.logging.log4j2 appender

**URL:** https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825
**Category:** Elasticsearch
**Created:** [June 23, 2016, 7:37pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825 "2016-06-23T19:37:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jonas.lima](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jonas.lima](https://discuss.elastic.co/u/jonas.lima)
#### Post date: [June 23, 2016, 7:37pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825/1 "2016-06-23T19:37:12Z")

</div>

The appender not send my logs to elastic. What's wrong ??  
In kibana or quering in elasticsearch doesn't find any index.

In java code using log4j2:  
`private static final Logger log = LogManager.getLogger(ApplicationMain.class);`  
XML:  
`<NoSql name="elasticsearchAppender"> <Elasticsearch url="http://localhost:9200/_bulk" index="'mapeadorrw-'yyyyMMdd" type="log4j2" /> </NoSql> <NoSql name="sfuAppender"> <Elasticsearch url="http://localhost:9200/_bulk" index="'sfu-mapeadorrw-'yyyyMMdd" type="log4j2" /> </NoSql> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="${layout}" /> </Console> .... <Loggers> <logger name="sfu"> <appender-ref ref="sfuAppender" /> </logger> <Root level="TRACE"> <AppenderRef ref="FileProducao" level="INFO" /> <AppenderRef ref="Console" level="TRACE" /> <appender-ref ref="elasticsearchAppender" level="INFO" /> <AppenderRef ref="FileError" level="ERROR" /> </Root> </Loggers>`

---

<div class="post-metadata">

### Author: ![jonas.lima](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jonas.lima](https://discuss.elastic.co/u/jonas.lima)
#### Post date: [June 23, 2016, 7:58pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825/2 "2016-06-23T19:58:09Z")

</div>

i found the solution.  
In the property only change the provider of jboss to log4j2

`static { // runs when the main class is loaded. System.setProperty("logback-access.debug", "true"); System.setProperty("org.jboss.logging.provider", "log4j2"); }`

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [June 23, 2016, 8:15pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825/3 "2016-06-23T20:15:43Z")

</div>

If you have any more questions about my log4j2 Elasticsearch HTTP appender, then you can also open an issue at

> **[jprante/log4j2-elasticsearch-http](https://github.com/jprante/log4j2-elasticsearch-http/issues)**
>
> log4j2-elasticsearch-http - Log4j2 Elasticsearch appender using the Java JDK HTTP client

---

<div class="post-metadata">

### Author: ![jonas.lima](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@jonas.lima](https://discuss.elastic.co/u/jonas.lima)
#### Post date: [June 23, 2016, 10:17pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825/4 "2016-06-23T22:17:46Z")

</div>

Great.

---

<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 5, 2017, 10:40pm UTC](https://discuss.elastic.co/t/help-with-org-xbib-logging-log4j2-appender/53825/5 "2017-07-05T22:40:57Z")

</div>


