public static String prettyPrint ( TraceEvent te ) { if ( te . getType ( ) != TraceEvent . GET_CONNECTION_LISTENER && te . getType ( ) != TraceEvent . GET_CONNECTION_LISTENER_NEW && te . getType ( ) != TraceEvent . GET_INTERLEAVING_CONNECTION_LISTENER && te . getType ( ) != TraceEvent . GET_INTERLEAVING_CONNECTION_LISTENER_NEW && te . getType ( ) != TraceEvent . RETURN_CONNECTION_LISTENER && te . getType ( ) != TraceEvent . RETURN_CONNECTION_LISTENER_WITH_KILL && te . getType ( ) != TraceEvent . RETURN_INTERLEAVING_CONNECTION_LISTENER && te . getType ( ) != TraceEvent . RETURN_INTERLEAVING_CONNECTION_LISTENER_WITH_KILL && te . getType ( ) != TraceEvent . CREATE_CONNECTION_LISTENER_GET && te . getType ( ) != TraceEvent . CREATE_CONNECTION_LISTENER_PREFILL && te . getType ( ) != TraceEvent . CREATE_CONNECTION_LISTENER_INCREMENTER && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_RETURN && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_IDLE && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_INVALID && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_FLUSH && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_ERROR && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_PREFILL && te . getType ( ) != TraceEvent . DESTROY_CONNECTION_LISTENER_INCREMENTER && te . getType ( ) != TraceEvent . EXCEPTION && te . getType ( ) != TraceEvent . PUSH_CCM_CONTEXT && te . getType ( ) != TraceEvent . POP_CCM_CONTEXT ) return te . toString ( ) ; StringBuilder sb = new StringBuilder ( ) ; sb . append ( "IJTRACER" ) ; sb . append ( "-" ) ; sb . append ( te . getPool ( ) ) ; sb . append ( "-" ) ; sb . append ( te . getManagedConnectionPool ( ) ) ; sb . append ( "-" ) ; sb . append ( te . getThreadId ( ) ) ; sb . append ( "-" ) ; sb . append ( te . getType ( ) ) ; sb . append ( "-" ) ; sb . append ( te . getTimestamp ( ) ) ; sb . append ( "-" ) ; sb . append ( te . getConnectionListener ( ) ) ; sb . append ( "-" ) ; sb . append ( "DATA" ) ; return sb . toString ( ) ; }
Pretty print event