code: public static void log(Logger logger,
                             Level level,
                             String message,
                             Object[] parameters) {
          if (logger.isLoggable(level)) {
              String msg = localize(logger, message);
              try {
                  msg = MessageFormat.format(msg, parameters);
              } catch (IllegalArgumentException ex) {
                  //ignore, log as is
              }
              doLog(logger, level, msg, null);
          }
      }
docs: Checks log level and logs
  
  @param logger the Logger the log to
  @param level the severity level
  @param message the log message
  @param parameters the parameters to substitute into message