docs: function resolveLoggingFunction(logger, loggingFnName, useLogLevelPrefix, logLevelPrefix) {
    // Bind the relevant log function to its appropriate logger
    const loggingFn = logger[loggingFnName].bind(logger);
  
    // Note that we skip adding a prefix when using console.trace, since it already includes its own prefix 'Trace: '
    if (!useLogLevelPrefix || (logger === console && loggingFnName === 'trace')) {
      return loggingFn;
    }
  
    function logWithPrefix() {
      if (arguments.length > 0) {
        const arg0 = arguments[0];
        if (!isString(arg0) || !arg0.startsWith(logLevelPrefix)) {
          arguments[0] = `${logLevelPrefix} ${arg0 instanceof Error && arg0.stack ? arg0.stack : arg0}`;
        }
      }
      return loggingFn.apply(null, arguments); // prior bind takes precedence over any apply (so just apply with null)
    }
  
    return logWithPrefix;
  }