@aws-amplify/pubsub 4.2.9 → 4.2.10-cloud-logging.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8342,7 +8342,11 @@ function (_super) {
8342
8342
  };
8343
8343
 
8344
8344
  AWSAppSyncRealTimeProvider.prototype._handleIncomingSubscriptionMessage = function (message) {
8345
- logger.debug("subscription message from AWS AppSync RealTime: " + message.data);
8345
+ if (message.data && message.data === '{"type":"ka"}') {
8346
+ logger.verbose("subscription message from AWS AppSync RealTime: " + message.data);
8347
+ } else {
8348
+ logger.debug("subscription message from AWS AppSync RealTime: " + message.data);
8349
+ }
8346
8350
 
8347
8351
  var _a = JSON.parse(message.data),
8348
8352
  _b = _a.id,
@@ -8361,12 +8365,21 @@ function (_super) {
8361
8365
  subscriptionReadyCallback = _c.subscriptionReadyCallback,
8362
8366
  subscriptionFailedCallback = _c.subscriptionFailedCallback;
8363
8367
 
8364
- logger.debug({
8365
- id: id,
8366
- observer: observer,
8367
- query: query,
8368
- variables: variables
8369
- });
8368
+ if (!id && !observer && !query && Object.keys(variables).length === 0) {
8369
+ logger.verbose({
8370
+ id: id,
8371
+ observer: observer,
8372
+ query: query,
8373
+ variables: variables
8374
+ });
8375
+ } else {
8376
+ logger.debug({
8377
+ id: id,
8378
+ observer: observer,
8379
+ query: query,
8380
+ variables: variables
8381
+ });
8382
+ }
8370
8383
 
8371
8384
  if (type === MESSAGE_TYPES.GQL_DATA && payload && payload.data) {
8372
8385
  if (observer) {