log = (message, method, color, _date, transaction, completed) => {
  const {
    mount,
    newTree,
    patches,
    promises,
    config,
    input,
    state,
  } = transaction;

  // Shadow DOM rendering...
  if (mount.host) {
    const { name: ctorName }  = mount.host.constructor;

    console[method](
      `%c${ctorName} render ${completed ? 'ended' : 'started' }`,
      `color: ${stringToRGB(ctorName)}${completed ? '; opacity: 0.5' : ''}`,
      completed ? completed : ''
    );
  }
  else {
    console[method](message, color, completed ? completed : '');
  }

  if (!completed && mount) {
    console.log('%cmount %O', 'font-weight: bold; color: #868686', mount);
  }

  if (!completed && input) {
    console.log('%cmarkup %O', 'font-weight: bold; color: #868686', input);
  }

  if (!completed && config) {
    console.log(
      '%coptions',
      'font-weight: bold; color: #868686',
      config
    );
  }

  if (state) {
    console.log(
      '%cstate %O',
      'font-weight: bold; color: #868686',
      state,
    );
  }

  if (transaction._cloneOldTree || newTree) {
    console.log(
      '%coldTree %O newTree %O',
      'font-weight: bold; color: #868686',
      transaction._cloneOldTree,
      cloneTree(newTree)
    );
  }

  if (patches && patches.length) {
    const [ formattedPatches, uniqueCount ] = format(patches);

    console.log(
      '%cpatches (%d) %O', 'font-weight: bold; color: #868686',
      uniqueCount,
      formattedPatches,
    );
  }

  // Don't clutter the output if there aren't any promises.
  if (promises && promises.length) {
    console.log(
      '%ctransition promises %O', 'font-weight: bold; color: #868686', promises
    );
  }
}
Re-usable log function. Used for during render and after render.

@param {string} message - Prefix for the console output.
@param {string} method - Which console method to call
@param {string} color - Which color styles to use
@param {Date} _date - A date object to render
@param {import('diffhtml/lib/transaction').default} transaction - Contains: domNode, oldTree, newTree, patches, promises
@param {any=} completed - Middleware options