Here you can find the source of printSQLExceptionToErrorLog(Log logger, String message, List
public static void printSQLExceptionToErrorLog(Log logger, String message, List<SQLException> sqlExceptions)
//package com.java2s; //License from project: Apache License import java.sql.SQLException; import java.util.List; import org.apache.commons.logging.Log; public class Main { public static void printSQLExceptionToErrorLog(Log logger, String message, List<SQLException> sqlExceptions) { if (sqlExceptions != null && !sqlExceptions.isEmpty()) { for (SQLException sqlException : sqlExceptions) { logger.error(message, sqlException); }//from w w w . jav a2 s . co m sqlExceptions.clear(); } } }