I'm new to Java, I have to log enter and exit of function flow, it's quite easy doing it in C++, but I don't know how to do it in Java.
Any input will be appreciated.
There are several logging libraries (log4J http://logging.apache.org/log4j/1.2/ being a commonly used one) and slf4J http://www.slf4j.org/ being particularly useful as it is library agnostic.
If you want to log every function entry/exit you could look at AspectJ/AOP as mentioned in this post How to use AOP with AspectJ for logging?
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