Fix how we evaluate if customlogger is on classpath
Resources must replace `.` -> `/` and add `.class` to the end.
This commit is contained in:
parent
2d0636e158
commit
8512b841e6
|
@ -276,7 +276,8 @@ public class TracingAgent {
|
|||
|
||||
final String logManagerProp = System.getProperty("java.util.logging.manager");
|
||||
if (logManagerProp != null) {
|
||||
final boolean onSysClasspath = ClassLoader.getSystemResource(logManagerProp) != null;
|
||||
final boolean onSysClasspath =
|
||||
ClassLoader.getSystemResource(logManagerProp.replaceAll("\\.", "/") + ".class") != null;
|
||||
if (debugEnabled) {
|
||||
System.out.println("Prop - logging.manager: " + logManagerProp);
|
||||
System.out.println("logging.manager on system classpath: " + onSysClasspath);
|
||||
|
|
|
@ -20,7 +20,9 @@ public class LogManagerSetter {
|
|||
"jmxfetch should start in premain when customlogmanager=false.");
|
||||
}
|
||||
} else if (System.getProperty("java.util.logging.manager") != null) {
|
||||
if (ClassLoader.getSystemResource(System.getProperty("java.util.logging.manager")) == null) {
|
||||
if (ClassLoader.getSystemResource(
|
||||
System.getProperty("java.util.logging.manager").replaceAll("\\.", "/") + ".class")
|
||||
== null) {
|
||||
customAssert(
|
||||
isJmxfetchStarted(),
|
||||
false,
|
||||
|
|
Loading…
Reference in New Issue