Hi All: I have a use case where I use Log4j 2 for logging within a JDBC driver. I'd like to support the DataSource#setLogWriter(PrintStream) API in a fairly simple way. Granting that Log4j must be configured, if the user calls setLogWriter, I'd like to add a "print writer appender" to Log4j such that the user's PrintWriter becomes an appender target for log events.
Any thoughts on getting this to work considering that the setLogWriter API can be called at any time in an apps life cycle. If I can get a clean impl, I'd like to put it in the iostreams module. Does this require a full reconfigure of log4j or is there a way to "just add an appender" programatically? Gary -- E-Mail: [email protected] | [email protected] Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
