Skip to content

Commit

Permalink
fix: improve debug logging
Browse files Browse the repository at this point in the history
Signed-off-by: Joke de Buhr <joke@xckk.de>
  • Loading branch information
joke committed Jun 5, 2022
1 parent 7793a06 commit 7000c03
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,27 @@ public Throwable onError(final Instrumentation instrumentation, final Resettable
private static class DiscoveryListener extends AgentBuilder.Listener.Adapter {
@Override
public void onError(final String typeName, final ClassLoader classLoader, final JavaModule module, final boolean loaded, final Throwable throwable) {
log.warn("Could not transform class '{}'", typeName, throwable);
log.warn("Could not transform class '{}', loaded: {}", typeName, loaded, throwable);
}

@Override
public void onComplete(final String typeName, final ClassLoader classLoader, final JavaModule module, final boolean loaded) {
log.trace("Transformed class {}'", typeName);
log.trace("Processed class '{}', loaded: {}", typeName, loaded);
}

@Override
public void onDiscovery(final String typeName, final ClassLoader classLoader, final JavaModule module, final boolean loaded) {
log.trace("Processing class '{}', loaded: {}", typeName, loaded);
}

@Override
public void onTransformation(final TypeDescription typeDescription, final ClassLoader classLoader, final JavaModule module, final boolean loaded, final DynamicType dynamicType) {
log.debug("Transforming class '{}', loaded: {}", typeDescription, loaded);
}

@Override
public void onIgnored(final TypeDescription typeDescription, final ClassLoader classLoader, final JavaModule module, final boolean loaded) {
log.trace("Ignoring class '{}', loaded: {}", typeDescription, loaded);
}
}

Expand Down

0 comments on commit 7000c03

Please sign in to comment.