public class PrintTraceIdInterceptor extends Object implements StaticMethodsAroundInterceptor
| Constructor and Description |
|---|
PrintTraceIdInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
Object |
afterMethod(Class clazz,
Method method,
Object[] allArguments,
Class<?>[] parameterTypes,
Object ret) |
void |
beforeMethod(Class clazz,
Method method,
Object[] allArguments,
Class<?>[] parameterTypes,
MethodInterceptResult result)
Override org.apache.skywalking.apm.toolkit.log.log4j.v2.x.Log4j2OutputAppender.append(),
|
void |
handleMethodException(Class clazz,
Method method,
Object[] allArguments,
Class<?>[] parameterTypes,
Throwable t) |
public void beforeMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes, MethodInterceptResult result)
beforeMethod in interface StaticMethodsAroundInterceptormethod - result - change this result, to output the traceId. The origin append() method will not invoke.public Object afterMethod(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes, Object ret)
afterMethod in interface StaticMethodsAroundInterceptorpublic void handleMethodException(Class clazz, Method method, Object[] allArguments, Class<?>[] parameterTypes, Throwable t)
handleMethodException in interface StaticMethodsAroundInterceptorCopyright © 2019 The Apache Software Foundation. All rights reserved.