"johnbailey" wrote :
| I would also like to know if there are any ground rules on logging and Exception
handling to follow.
They're on the WIKI somewhere.
Basically:
ERROR - if a system admin would need to know (but only if you handle the error - don;t log
and rethrow that just leads to duplicate logging!)
WARN - may be a problem but you can recover
INFO - is this something somebody is likely to find really useful?
DEBUG - deployment time or other low volume logging
TRACE - Everything else you might need to understand what happened
e.g. in your example
| public URL getEntry()
| {
| try
| {
| ...
| }
| catch (Exception e)
| {
| if (log.isTraceEnabled())
| log.trace("Error getting entry: " + entry, e);
| return null;
| }
| }
|
Dont use isXEnabled for anything but TRACE.
All other logging should be such low volume that it isn't necessary
and probably redundant.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133264#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...