01: /*
02: * $Header: /cvsroot/webman-cms/source/webman/com/teamkonzept/lib/TKDBLogger.java,v 1.7 2001/06/11 09:14:09 alex Exp $
03: *
04: */
05: package com.teamkonzept.lib;
06:
07: import java.sql.*;
08: import org.apache.log4j.Category;
09:
10: /**
11: * Der TKDBLogger
12: */
13: public class TKDBLogger {
14: private static final Category cat = Category
15: .getInstance(TKDBLogger.class);
16:
17: /**
18: * Ausgabe der SQLExeption Messages
19: *
20: * @param SQLException ex, Exception von SQL
21: */
22: public static void logSQLException(SQLException ex) {
23: while (ex != null) {
24: cat.error("SQLState: " + ex.getSQLState(), ex);
25: cat.error("Vendor: " + ex.getErrorCode());
26: ex = ex.getNextException();
27: }
28: }
29: }
|