Package net.sf.basedb.core
Class LogUtil
java.lang.Object
net.sf.basedb.core.LogUtil
Utility class for LOG4J logging.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2014-04-09 14:21:20 +0200 (on, 09 apr 2014) $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
logSQLExceptionChain
(Logger logger, SQLException ex) Log the chained exceptions of an SQLException.
-
Constructor Details
-
LogUtil
public LogUtil()
-
-
Method Details
-
logSQLExceptionChain
Log the chained exceptions of an SQLException. An SQLException is different from other exceptions in that is usesSQLException.getNextException()
instead ofThrowable.getCause()
to chain exceptions. This methods log thegetNextException
chain.Note! This method doesn't log the
ex
exception. It only logs the chained exceptions. If there are more than 10 nested exception it only logs the first 10.- Parameters:
logger
- The logger to useex
- The SQL exception
-