private String toLog4jMessage ( LogRecord record ) { String message = record . getMessage ( ) ; // Format message Object [ ] parameters = record . getParameters ( ) ; if ( ( parameters != null ) && ( parameters . length != 0 ) ) { // Check for the first few parameters ? if ( ( message . indexOf ( "{0}" ) >= 0 ) || ( message . indexOf ( "{1}" ) >= 0 ) || ( message . indexOf ( "{2}" ) >= 0 ) || ( message . indexOf ( "{3}" ) >= 0 ) ) { message = MessageFormat . format ( message , parameters ) ; } } return message ; }
Transforms a java . util . logging . LogRecord to a message printable on Log4J .