JDBCLoggerpublic class JDBCLogger extends Object
Fields Summary |
---|
private static Hashtable | QueryTime |
Methods Summary |
---|
public static void | endLogSqlNext(java.lang.Thread t, java.lang.String sql)
| public static void | endLogSqlQuery(java.lang.Thread t, java.lang.String sql)
long time = System.currentTimeMillis();
time -= ((Long) QueryTime.get(t)).longValue();
System.out.println("Time: " + time + " millis for SQL query " + sql);
QueryTime.remove(t);
| public static void | startLogSqlNext(java.lang.Thread t, java.lang.String sql)
| public static void | startLogSqlQuery(java.lang.Thread t, java.lang.String sql)
if (QueryTime.get(t) != null)
System.out.println("WARNING: overwriting sql query log time for " + sql);
QueryTime.put(t, new Long(System.currentTimeMillis()));
|
|