code: function log(logger, data) {
    // Collect all arguments other than logger
    const len = arguments.length;
    if (len <= 0) {
      console.log();
      return;
    }
    const args = new Array(len - 1);
    for (let i = 1; i < len; ++i) {
      args[i - 1] = arguments[i];
    }
    // If a logger was provided & it has a log method, then use it
    if (logger && typeof logger.log === 'function') {
      logger.log.apply(logger, args);
    } else if (logger && typeof logger.info === 'function') {
      // If a logger was provided & it has a info method, then use it
      logger.info.apply(logger, args);
    } else {
      // otherwise use console
      console.log.apply(console, args);
    }
  }
docs: A convenience function that delegates the logging to the log method of either the given logger (if its defined and
  has a log or info method) or to console (if not)
  @param {Logger|BasicLogger|undefined} [logger] - the optional logger to use
  @param {...*} data - zero or more data items to be logged