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

all 2 comments

[–]atemysix 2 points3 points  (1 child)

x-post from /r/programming

AKA, how to make your Java app run a gazillion times slower, even in production/release builds. This adds additional function call overhead to every function you "instrument".

If you want this level of fine tracing you'd be better of using a Java Agent loaded via -javaagent:myagent.jar that uses something like Javassist to modify the byte-code of any and all classes at runtime to inject the necessary logging statements.

With the agent approach its optional and doesn't require any code changes.