protected String constructMessage ( long seq , Throwable thrown , long execTime , String connectionId , Class < ? > targetClass , Method method , String args ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "[" ) ; sb . append ( seq ) ; sb . append ( "]" ) ; sb . append ( "[" ) ; sb . append ( thrown == null ? "success" : "fail" ) ; sb . append ( "]" ) ; sb . append ( "[" ) ; sb . append ( execTime ) ; sb . append ( "ms]" ) ; sb . append ( "[conn=" ) ; sb . append ( connectionId ) ; sb . append ( "]" ) ; if ( thrown != null ) { sb . append ( "[error=" ) ; sb . append ( thrown . getMessage ( ) ) ; sb . append ( "]" ) ; } sb . append ( " " ) ; sb . append ( targetClass . getSimpleName ( ) ) ; sb . append ( "#" ) ; sb . append ( method . getName ( ) ) ; sb . append ( "(" ) ; sb . append ( args ) ; sb . append ( ")" ) ; return sb . toString ( ) ; }
Construct a message to log .