Here you can find the source of logSqlError(SQLException ex, Logger logger)
public static void logSqlError(SQLException ex, Logger logger)
//package com.java2s; //License from project: Open Source License import java.sql.SQLException; import org.apache.log4j.Logger; public class Main { public static void logSqlError(SQLException ex, Logger logger) { System.out.printf(//from ww w.java 2s. co m "DBERROR OCCURS: \n CODE-%d\n STATE: %s MESSAGE: %s", +ex.getErrorCode(), ex.getSQLState(), ex.getMessage()); } }