private final void internalEvent ( Object source , Class sourceClass , String methodName , Throwable throwable ) { StringBuffer stringBuffer = new StringBuffer ( ) ; stringBuffer . append ( methodName ) ; stringBuffer . append ( " [" ) ; if ( source != null ) { stringBuffer . append ( source ) ; } else { stringBuffer . append ( "Static" ) ; } stringBuffer . append ( "]" ) ; if ( throwable != null ) { SibTr . event ( traceComponent , stringBuffer . toString ( ) , new Object [ ] { "Exception caught: " , throwable } ) ; } else { SibTr . event ( traceComponent , stringBuffer . toString ( ) ) ; } if ( usePrintWriterForTrace ) { java . io . PrintWriter printWriter = traceFactory . getPrintWriter ( ) ; if ( printWriter != null ) { printWriter . print ( new java . util . Date ( ) + " E " ) ; printWriter . print ( sourceClass . getName ( ) ) ; printWriter . print ( "." ) ; printWriter . println ( stringBuffer . toString ( ) ) ; if ( throwable != null ) { throwable . printStackTrace ( printWriter ) ; } printWriter . flush ( ) ; } } }
Internal implementation of event tracing .