cc.catalysts.boot.profiling.annotation.MethodProfiling Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cat-boot-profiling Show documentation
Show all versions of cat-boot-profiling Show documentation
Catalysts Spring Boot extentions
package cc.catalysts.boot.profiling.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* If you put this annotation on a spring bean (either on class or on method level) then all method calls are traced and logged
* with with {@link cc.catalysts.boot.profiling.MethodCallProfiler} in case the log level of your target bean is set to TRACE
.
*
* @author Klaus Lehner
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface MethodProfiling {
/**
* If this value is true
, then we track call statistics and log them separately
*
* @return true, if call statistics should be printed
*/
boolean logCallStatistics() default true;
/**
* If this value is true
, we log the mehod call with all incoming and outgoing parameters
*
* @return
*/
boolean logMethodCall() default true;
/**
* If {@link #logMethodCall()} is true
, then we log all incoming and outgouing parameters. This value
* limits the string-representation of each parameter to a maximum.
*
* @return die maximum length of the string-representation of an object that is logged
*/
int maxToStringLength() default Integer.MAX_VALUE;
}