I do not understand "Just have the initial writer be a noop."

Gary

On Thu, Jun 18, 2015 at 5:40 PM, Ralph Goers <[email protected]>
wrote:

> Why reconfigure? Just have the initial writer be a noop.
>
> Sent from my iPhone
>
> On Jun 18, 2015, at 3:49 PM, Gary Gregory <[email protected]> wrote:
>
> 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
>
>


-- 
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

Reply via email to