protected String formatLogMessage ( LogLevel level , Object [ ] message , Throwable throwable ) { //get text String messageText = this . format ( message ) ; String throwableText = this . format ( throwable ) ; //init buffer StringBuilder buffer = new StringBuilder ( ) ; //append prefix buffer . append ( "[fax4j][" ) ; buffer . append ( level . getName ( ) ) ; buffer . append ( "] " ) ; if ( messageText != null ) { buffer . append ( messageText ) ; if ( throwableText != null ) { buffer . append ( Logger . SYSTEM_EOL ) ; buffer . append ( throwableText ) ; } } else if ( throwableText != null ) { buffer . append ( throwableText ) ; } //get text String text = buffer . toString ( ) ; return text ; }
Converts the provided data to string .