There's no rules for this-it just depends on what you want to log. Method entry is usually a debug/or trace level, though, sine you don't normally care-you just want to know that it did something right (or wrong). And the logging framework itself may log the method name-depends on what you're using and how it's configured. I don't put that kind of info into log statements, just useful info.
(I sometimes handle entry/exit via AOP, since I don't normally need that kind of detail, but it all depends.)
In generally its upto the user to decide what he wants to put in logs. Depending on critically of the errors log can be made at different level.
In my view, i place the exception in log level "ERROR" and user input(intermidiate calculation data) in log level 'DEBUG', so that its easy to debug when there are errors.
In general for a application log level "ERROR" is enabled, So we should try to write less details in it as it may impact the performance.
Sudipta Kumar Laha
It's just a flesh wound! Or a tiny ad:
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF