Class LogUtil


  • public class LogUtil
    extends Object
    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 Detail

      • LogUtil

        public LogUtil()
    • Method Detail

      • logSQLExceptionChain

        public static void logSQLExceptionChain​(org.slf4j.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