Optimize Instrumenter logging
@@ -128,15 +128,23 @@ public interface Instrumenter {
final List<Reference.Mismatch> mismatches =
muzzle.getMismatchedReferenceSources(classLoader);
if (mismatches.size() > 0) {
+ if (log.isDebugEnabled()) {
log.debug(
"Instrumentation muzzled: {} -- {} on {}",
instrumentationPrimaryName,
- getClass().getName(),
+ this.getClass().getName(),
classLoader);
- }
- for (final Reference.Mismatch mismatch : mismatches) {
+ for (Reference.Mismatch mismatch : mismatches) {
log.debug("-- {}", mismatch);
}
+ }
+ } else {
+ log.debug(
+ "Applying instrumentation: {} -- {} on {}",
+ instrumentationPrimaryName,
+ this.getClass().getName(),
+ classLoader);
+ }
return mismatches.size() == 0;
}
return true;
