public static Connection newInstance(Connection conn, Log statementLog, int queryStack) {
        InvocationHandler handler = new ConnectionLogger(conn, statementLog, queryStack);
        ClassLoader cl = Connection.class.getClassLoader();
        return (Connection) Proxy.newProxyInstance(cl, new Class[]{Connection.class}, handler);
    }
public static Connection newInstance ( Connection conn , Log statementLog , int queryStack ) { InvocationHandler handler = new ConnectionLogger ( conn , statementLog , queryStack ) ; ClassLoader cl = Connection . class . getClassLoader ( ) ; return ( Connection ) Proxy . newProxyInstance ( cl , new Class [ ] { Connection . class } , handler ) ; }
/*
Creates a logging version of a connection

@param conn - the original connection
@return - the connection with logging