public static String getFormattedMessageFromLocalizedMessage ( String traceString , Object [ ] newParms , boolean b ) { String retVal = "" ; try { retVal = MessageFormat . format ( traceString , newParms ) ; if ( null == retVal && b ) { retVal = traceString ; // System.out.println("Using default key"); } } catch ( IllegalArgumentException e ) { // ignore formatting errors. otherwise server may not start retVal = traceString ; // if (quiet) { // logger.log(Level.SEVERE, "Exception formatting key", e); // } } return retVal ; }
Retrieve a string from the bundle and format it using the parameters