code: void log(LogRecord record, boolean wasForced) {
      // Do the fast boolean check (which normally succeeds) before calling isLoggable().
      if (!wasForced || logger.isLoggable(record.getLevel())) {
        // Unforced log statements or forced log statements at or above the logger's level can be
        // passed to the normal log(LogRecord) method.
        logger.log(record);
      } else {
        // If logging has been forced for a log record which would otherwise be discarded, we cannot
        // call our logger's log(LogRecord) method, so we must simulate its behavior in one of two
        // ways.
        // 1: Simulate the effect of calling the log(LogRecord) method directly (this is safe if the
        //    logger provided by the log manager was a normal Logger instance).
        // 2: Obtain a "child" logger from the log manager which is set to log everything, and call
        //    its log(LogRecord) method instead (which should have the same overridden behavior and
        //    will still publish log records to our logger's handlers).
        //
        // In all cases we still call the filter (if one exists) even though we ignore the result.
        // Use a local variable to avoid race conditions where the filter can be unset at any time.
        Filter filter = logger.getFilter();
        if (filter != null) {
          filter.isLoggable(record);
        }
        if (logger.getClass() == Logger.class || cannotUseForcingLogger) {
          // If the Logger instance is not a subclass, its log(LogRecord) method cannot have been
          // overridden. That means it's safe to just publish the log record directly to handlers
          // to avoid the loggability check, which would otherwise discard the forced log record.
          publish(logger, record);
        } else {
          // Hopefully rare situation in which the logger is subclassed _and_ the log record would
          // normally be discarded based on its level.
          forceLoggingViaChildLogger(record);
        }
      }
    }
docs: loggability check.