geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject mx4j logging init
Date Tue, 27 Feb 2007 03:02:47 GMT
Anyone know if we can replace these bits in GeronimoLogging.initialize()

<snip>
try {
     Class clazz = Class.forName("mx4j.log.Log");
     Class paramClazz = Class.forName("mx4j.log.Logger");
     Method method = clazz.getDeclaredMethod("redirectTo", new Class 
[] {paramClazz});
     paramClazz = Class.forName("mx4j.log.CommonsLogger");
     method.invoke(null, new Object[] {paramClazz.newInstance()});
} catch (ClassNotFoundException e) {
     // MX4J is not present.
} catch (Exception e) {
     throw (AssertionError) new AssertionError("Cannot force MX4J to  
use commons logging.").initCause(e);
}
</snip>

With:

<snip>
System.setProperty("mx4j.log.prototype", "mx4j.log.CommonsLogger");
</snip>

--jason

Mime
View raw message