public class LogTransformer extends Object implements ClassFileTransformer
LogTransformer does the work of analyzing each class, and if appropriate add log statements to each method to allow logging entry/exit.
This class is based on the article Add Logging at Class Load Time with Java Instrumentation.
Modifier and Type | Class and Description |
---|---|
static class |
LogTransformer.Builder
Builder provides a flexible way of configuring some of many options on the
parent class instead of providing many constructors.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
transform(ClassLoader loader,
String className,
Class<?> clazz,
ProtectionDomain domain,
byte[] bytes) |
public byte[] transform(ClassLoader loader, String className, Class<?> clazz, ProtectionDomain domain, byte[] bytes)
transform
in interface ClassFileTransformer
Copyright © 2005–2019 QOS.ch. All rights reserved.