private void parameterizedLog(final String level,
                                final Object parameterizedMsg,
                                final Object param1,
                                final Object param2) {
    if (parameterizedMsg instanceof String) {
      String msgStr = (String) parameterizedMsg;
      msgStr = MessageFormatter.format(msgStr, param1, param2);
      log(level, msgStr, null);
    } else {
      // To be failsafe, we handle the case where 'messagePattern' is not
      // a String. Unless the user makes a mistake, this should not happen.
      log(level, parameterizedMsg.toString(), null);
    }
  }
private void parameterizedLog ( final String level , final Object parameterizedMsg , final Object param1 , final Object param2 ) { if ( parameterizedMsg instanceof String ) { String msgStr = ( String ) parameterizedMsg ; msgStr = MessageFormatter . format ( msgStr , param1 , param2 ) ; log ( level , msgStr , null ) ; } else { log ( level , parameterizedMsg . toString ( ) , null ) ; } }
For parameterized messages, first substitute parameters and then log.

@param level level
@param parameterizedMsg message pattern
@param param1 param1
@param param2 param2