THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
- In general logging is a good idea.
- Use Commons Logging.
- For debug messages, call
if (log.isDebugEnabled())
prior to callinglog.debug()
. - The following code is usually bad. There is no need to log exception and re-throw it:
Either log it, or re-throw.Code Block try { } catch (Exception e) { logger.error(e.getMessage(), e); throw new RuntimeException(e); }
Logging Messages
- Messages which are visible to the end user should have their strings externalized and read from a properties file to allow for easier NLS translation.
- Debug messages do not need to be put into a properties file.
Formatting
In a perfect world all people, who contribute code, use the same IDE with the same formatting preferences which, for example, significantly reduces a number of redundant SVN merges.
...