code: public static void log(TreeLogger logger, TreeLogger.Type type, String formatString,
        Object... args) {
      if (logger.isLoggable(type)) {
        logger.log(type, format(formatString, args));
      }
    }
docs: Log a pretty-printed message if the given log level is active.  The message
  is only formatted if it will be logged.