Watch out for bad logging: Apache Commons Logging
If you (or your team) use Apache Commons Logging as a logging framework, you may encounter an incorrect way how you log your exceptions (regardless of the logging level – WARN, ERROR, …). It looks like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
try { ... some code ... } catch (Exception e) { log.error(e); } // or try { ... some code ... } catch (Exception e) { log.error("Unexpected exception: " + e); } |
Logging with one parameter has this method signature: Main purpose of this method is to log a […]