logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò <ilgro...@apache.org>
Subject Using Spring-managed DataSource (or other Spring beans) in log4j2 configuration
Date Fri, 13 Sep 2013 15:26:50 GMT
Hi all,
I am trying to configure a JDBCAppender in log4j 2.0-beta9-SNAPSHOT, 
with a pre-existing DataSource managed via Spring; such DataSource is 
used by the rest of Syncope.

I have tried, without success. to provide a custom ConnectionSource or a 
ConnectionFactory: the point is that, when log4j2 initializes, the 
Spring context is yet to be built, hence no beans (including the 
DataSource referenced above) are available.

I have read from [1] that log4j2 features an "automatic configuration": 
is there any way to disable it and invoke it manually later?

Thanks for your support.


Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message