One trick that may work is to call Digester.setLogger() with your own org.apache.commons.logging.Log implementation that does nothing.

Or you can use org.apache.commons.logging.impl.NoOpLog, which does the same thing.




Simon Kitching wrote:
Hi,

Currently the Digester unit tests include some tests which deliberately
trigger failures.

This is fine - error handling should also be tested.
Unfortunately, when an error occurs, Digester calls log.warn or
log.error, which gets printed out in the middle of the junit output.
Yecch.

I also want to add some plugins unit tests which test error conditions,
and have the same problem.

Does anyone know of a nice way to temporarily disable logging when
running certain tests, given that we don't know which underlying logging
implementation commons-logging has discovered at runtime?

FYI, the main problem line of code is:
  Digester.java: 1273

Thanks,

Simon



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to