I've got a huge java project with tons of code. Let us assume it looks like:
fn1(int arg1){...}
fn2(int arg1,int arg2){...}
fn23(){...}
...
fn134(){...}
I want to log each invocation of functions using annotations:
@logme("arg1")
fn1(int arg1){...}
@logme("all args")
fn2(int arg1,int arg2){...}
fn23(){...}
...
fn134(){...}
and expect seeing
fn1(arg1=223)
fn1(arg1=213,arg2=46)
in my log files
Would you be so kind to propose me some tool?
Steve
I would recommend to use AspectJ for this purpose. Here you can find a short documentation how to define the appropriate PointCuts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With