Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How to log all the arguments values for all methods executions?

I am newbie at AspectJ and at this list, but I hope I can share too
much information with all.

How to log all the arguments values for all methods executions? I am
looking for something like this (I know it does not work):

pointcut allMethods( Object...values): execution(* *.*(*,*,*,*)) && args(..);

before(Object...values): allMethods(values) {
  System.out.println( "Args  values:" + java.util.Arrays.toString( values ) );
}

I guess I found a solution creating pointcuts for each possible number
of arguments in a method. But that is odd.

Thanks!


Back to the top