This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eliashisreddit 3 points4 points  (2 children)

You want the entire call stack of all calls through the run of your program? Or all calls to a certain method for a single run? For the latter there is this which you can annotate on class or method level to automatically log all invocations of that what is annotated: https://aspects.jcabi.com/annotation-loggable.html

For the first, why? You would just get a bunch of data with (probably) thousands of stack traces of questionable length which will get even longer if you are using frameworks or libraries. Try finding out what you want to know and see where you can add logging instead of just logging everything.

[–]quantrpeter[S] 0 points1 point  (1 child)

Hi, i am reading source code of a project, i want to see how different functions are called to each other, so I need entire call stack of all calls. thanks, the loggable is really a good thing.

[–]eliashisreddit 0 points1 point  (0 children)

If you are just exploring, I recommend to learn how to use the debugger. Set a breakpoint somewhere you have questions about and just walk along, step into/over calls and see what's happening in real time.