]
Bela Ban updated JGRP-1879:
---------------------------
Fix Version/s: 3.6
log4j 2 suport error
---------------------
Key: JGRP-1879
URL:
https://issues.jboss.org/browse/JGRP-1879
Project: JGroups
Issue Type: Bug
Affects Versions: 3.4.4, 3.5
Environment: jdk 7
Reporter: ming yue
Assignee: Bela Ban
Fix For: 3.6
LogFactory suport jdk log,log4j,log4j 2,but useing code like this:
USE_JDK_LOGGER=isPropertySet(Global.USE_JDK_LOGGER);
IS_LOG4J_AVAILABLE=isAvailable("org.apache.log4j.Logger");
IS_LOG4J2_AVAILABLE=isAvailable("org.apache.logging.log4j.core.Logger");
initialize var flag,
the isAvailable function depend on ClassNotFoundException ,when useing log4j 2 Log4j
1.x bridge, has org.apache.log4j.Logger class ,then exception is not
ClassNotFoundException ,change isAvailable cunction to:
protected static boolean isAvailable(String classname) {
try {
return Class.forName(classname) != null;
}
catch(Exception cnfe) {
return false;
}
}