net.sf.basedb.core
Class LogUtil
java.lang.Object
net.sf.basedb.core.LogUtil
public class LogUtil
- extends Object
Utility class for LOG4J logging.
- Version:
- 2.0
- Author:
- nicklas
- Last modified
- $Date: 2008-09-11 22:11:02 +0200 (Thu, 11 Sep 2008) $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogUtil
public LogUtil()
logSQLExceptionChain
public static void logSQLExceptionChain(Logger logger,
SQLException ex)
- Log the chained exceptions of an SQLException. An SQLException is different
from other exceptions in that is uses
SQLException.getNextException()
instead of Throwable.getCause()
to chain exceptions. This methods
log the getNextException
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