Hi folks,
Why is it harder to maintain?
Because we have to target multiple JDK version starting from 1.3 and you have
to write tests for each logging integration you provide out of the box
Why?
Because using commons-logging is not undisputed and log4j/jdk logging would
reduce the number of dependencies for a user
Can you explain the recipe please?
public class Log4jOutputStream extends BaseLogOutputStream {
private static Logger log = Logger.getLogger(Log4jOutputStream.class);
public Log4jOutputStream(final int level) {
super(level);
}
protected void processLine(final String line, final int level) {
log.debug(line);
}
}
Cheers,
Siegfried Goeschl
sebb wrote:
On 10/01/2008, Siegfried Goeschl <[EMAIL PROTECTED]> wrote:
Hi folks,
an interesting question for the newly founded commons-exec community -
the original code from commons-exec comes with a helper class to pump
stdout/stderr of the created process into the Commons Logging library
thereby introducing a non-optional dependency.
I changed the code to use stdout/stderr per default to make
commons-logging an optional dependency but the question remains - should
we support logging libraries within commons-exec?
+) doing so makes the library easier to use but harder to maintain
Why is it harder to maintain?
+) if we support commons-logging we might also need JDK logger, log4j
and avalon-logger
Why?
+) we could completely remove a dependency
+) I refactored the code (locally on my box) so that adding a new
logging library is a peace of cake (overwrite one method from a base class)
s/peace/piece/
Can you explain the recipe please?
So I lean towards removing the commons-logging related code completely
and provide documentation how to attach the logging library of your choice
Depending on the recipe, that may be the way.
Any comments
Siegfried Goeschl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]