code: function _sanitizeObject(obj) {
    if (obj === undefined) {
      return obj;
    }
    var seen = [];
    return JSON.parse((0, _stringify2.default)(obj, function (name, value) {
      if (seen.indexOf(value) !== -1) {
        return '[Circular]';
      }
      if (_lodash2.default.isObject(value)) {
        seen.push(value);
      }
      // Array of field names that should not be logged
      // add field if necessary (password, tokens etc)
      if (_lodash2.default.includes(_config.removeFields, name)) {
        return '<removed>';
      }
      if (name === 'req' && value && value.connection) {
        return {
          method: value.method,
          url: value.url,
          headers: value.headers,
          remoteAddress: value.connection.remoteAddress,
          remotePort: value.connection.remotePort
        };
      }
      if (name === 'res' && value && value.statusCode) {
        return {
          statusCode: value.statusCode,
          header: value._header
        };
      }
      if (_lodash2.default.isArray(value) && value.length > _config.maxArrayLength) {
        return 'Array(' + value.length + ')';
      }
      return value;
    }));
  }
docs: ------------------------------------ Private ------------------------------------ 
  Remove invalid properties from the object and hide long arrays
  @param {Object} obj the object
  @returns {Object} the new object with removed properties
  @private