How to use a DB-based Log4j Appender within jboss?

Solution Verified - Updated -

Issue

We have have a Log4j appender which writes to a database. If we put the appender configuration in the conf/jboss-log4j.xml file we get error saying it could not find the datasource.

This to me makes sense, because the datasources have not been deployed yet. Can we make it depend on the datasource, so it is not created until the database is ready?

Environment

  • JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content