2.17.2: 2011-06-17

net.sf.basedb.core
Class LogUtil

java.lang.Object
  extended by 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) $

Constructor Summary
LogUtil()
           
 
Method Summary
static void logSQLExceptionChain(Logger logger, SQLException ex)
          Log the chained exceptions of an SQLException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogUtil

public LogUtil()
Method Detail

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 use
ex - The SQL exception

2.17.2: 2011-06-17