function success(name, returnVal, throwReturnVal) {
    var returnValDefined = (arguments.length >= 2);
    name = 'success' + (name || '');
    return function() {
      return _logInvocation(name, arguments, (returnValDefined ? returnVal : arguments[0]), throwReturnVal);
    };
  }
Creates a callback that logs its invocation in `log`.

@param {(number|string)} name Suffix for 'success' name. e.g. success(1) => success1
@param {*=} returnVal Value that the callback should return. If unspecified, the passed in
    value is returned.
@param {boolean=} throwReturnVal If true, the `returnVal` will be thrown rather than returned.