quickblox 2.17.3-logger → 2.17.4-logger

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.
@@ -2699,6 +2699,8 @@ Strophe.Connection = /*#__PURE__*/function () {
2699
2699
  error.name = 'StropheSessionError';
2700
2700
  throw error;
2701
2701
  }
2702
+
2703
+ if (this.clientLogger) this.clientLogger('Strophe call unexpected method restore.');
2702
2704
  }
2703
2705
  /** PrivateFunction: _sessionCachingSupported
2704
2706
  * Checks whether sessionStorage and JSON are supported and whether we're
@@ -3059,6 +3061,7 @@ Strophe.Connection = /*#__PURE__*/function () {
3059
3061
  this._idleTimeout = setTimeout(function () {
3060
3062
  return _this5._onIdle();
3061
3063
  }, 100);
3064
+ if (this.clientLogger) this.clientLogger('Strophe _sendRestart method is called.');
3062
3065
  }
3063
3066
  /** Function: addTimedHandler
3064
3067
  * Add a timed handler to the connection.
@@ -3265,8 +3268,10 @@ Strophe.Connection = /*#__PURE__*/function () {
3265
3268
 
3266
3269
  if (reason) {
3267
3270
  Strophe.warn("Disconnect was called because: " + reason);
3271
+ if (this.clientLogger) this.clientLogger('Disconnect was called because: ' + reason);
3268
3272
  } else {
3269
3273
  Strophe.info("Disconnect was called");
3274
+ if (this.clientLogger) this.clientLogger('Disconnect was called');
3270
3275
  }
3271
3276
 
3272
3277
  if (this.connected) {
@@ -3286,6 +3291,7 @@ Strophe.Connection = /*#__PURE__*/function () {
3286
3291
  this._proto._disconnect(pres);
3287
3292
  } else {
3288
3293
  Strophe.warn("Disconnect was called before Strophe connected to the server");
3294
+ if (this.clientLogger) this.clientLogger('Disconnect was called before Strophe connected to the server');
3289
3295
 
3290
3296
  this._proto._abortAllRequests();
3291
3297
 
@@ -5951,7 +5957,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
5951
5957
  return _this._onInitialMessage(message);
5952
5958
  };
5953
5959
 
5954
- this._conn.clientLogger('_connect method was called with WebSocket protocol');
5960
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket protocol');
5955
5961
  }
5956
5962
  /** PrivateFunction: _connect_cb
5957
5963
  * _Private_ function called by Strophe.Connection._connect_cb
@@ -6143,6 +6149,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6143
6149
  key: "_doDisconnect",
6144
6150
  value: function _doDisconnect() {
6145
6151
  Strophe.debug("WebSockets _doDisconnect was called");
6152
+ if (this._conn.clientLogger) this._conn.clientLogger('WebSockets _doDisconnect was called');
6146
6153
 
6147
6154
  this._closeSocket();
6148
6155
  }
@@ -6174,6 +6181,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6174
6181
  this.socket.close();
6175
6182
  } catch (e) {
6176
6183
  Strophe.debug(e.message);
6184
+ if (this._conn.clientLogger) this._conn.clientLogger(e.message);
6177
6185
  }
6178
6186
  }
6179
6187
 
@@ -6209,6 +6217,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6209
6217
  // dispatch a CONNFAIL status update to be consistent with the
6210
6218
  // behavior on other browsers.
6211
6219
  Strophe.error("Websocket closed unexcectedly");
6220
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket closed unexcectedly');
6212
6221
 
6213
6222
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6214
6223
 
@@ -6265,6 +6274,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6265
6274
  key: "_onError",
6266
6275
  value: function _onError(error) {
6267
6276
  Strophe.error("Websocket error " + error);
6277
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket error ' + error);
6268
6278
 
6269
6279
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6270
6280
 
@@ -6502,8 +6512,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6502
6512
  };
6503
6513
 
6504
6514
  this.worker.port.postMessage(['_connect', this._conn.service, this._conn.jid]);
6505
-
6506
- this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6515
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6507
6516
  }
6508
6517
  }, {
6509
6518
  key: "_attach",
@@ -6564,6 +6573,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6564
6573
  value: function _onClose(e) {
6565
6574
  if (this._conn.connected && !this._conn.disconnecting) {
6566
6575
  Strophe.error("Websocket closed unexpectedly");
6576
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6567
6577
 
6568
6578
  this._conn._doDisconnect();
6569
6579
  } else if (e && e.code === 1006 && !this._conn.connected) {
@@ -6572,6 +6582,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6572
6582
  // dispatch a CONNFAIL status update to be consistent with the
6573
6583
  // behavior on other browsers.
6574
6584
  Strophe.error("Websocket closed unexcectedly");
6585
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6575
6586
 
6576
6587
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6577
6588
 
@@ -2695,6 +2695,8 @@ Strophe.Connection = /*#__PURE__*/function () {
2695
2695
  error.name = 'StropheSessionError';
2696
2696
  throw error;
2697
2697
  }
2698
+
2699
+ if (this.clientLogger) this.clientLogger('Strophe call unexpected method restore.');
2698
2700
  }
2699
2701
  /** PrivateFunction: _sessionCachingSupported
2700
2702
  * Checks whether sessionStorage and JSON are supported and whether we're
@@ -3055,6 +3057,7 @@ Strophe.Connection = /*#__PURE__*/function () {
3055
3057
  this._idleTimeout = setTimeout(function () {
3056
3058
  return _this5._onIdle();
3057
3059
  }, 100);
3060
+ if (this.clientLogger) this.clientLogger('Strophe _sendRestart method is called.');
3058
3061
  }
3059
3062
  /** Function: addTimedHandler
3060
3063
  * Add a timed handler to the connection.
@@ -3261,8 +3264,10 @@ Strophe.Connection = /*#__PURE__*/function () {
3261
3264
 
3262
3265
  if (reason) {
3263
3266
  Strophe.warn("Disconnect was called because: " + reason);
3267
+ if (this.clientLogger) this.clientLogger('Disconnect was called because: ' + reason);
3264
3268
  } else {
3265
3269
  Strophe.info("Disconnect was called");
3270
+ if (this.clientLogger) this.clientLogger('Disconnect was called');
3266
3271
  }
3267
3272
 
3268
3273
  if (this.connected) {
@@ -3282,6 +3287,7 @@ Strophe.Connection = /*#__PURE__*/function () {
3282
3287
  this._proto._disconnect(pres);
3283
3288
  } else {
3284
3289
  Strophe.warn("Disconnect was called before Strophe connected to the server");
3290
+ if (this.clientLogger) this.clientLogger('Disconnect was called before Strophe connected to the server');
3285
3291
 
3286
3292
  this._proto._abortAllRequests();
3287
3293
 
@@ -5947,7 +5953,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
5947
5953
  return _this._onInitialMessage(message);
5948
5954
  };
5949
5955
 
5950
- this._conn.clientLogger('_connect method was called with WebSocket protocol');
5956
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket protocol');
5951
5957
  }
5952
5958
  /** PrivateFunction: _connect_cb
5953
5959
  * _Private_ function called by Strophe.Connection._connect_cb
@@ -6139,6 +6145,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6139
6145
  key: "_doDisconnect",
6140
6146
  value: function _doDisconnect() {
6141
6147
  Strophe.debug("WebSockets _doDisconnect was called");
6148
+ if (this._conn.clientLogger) this._conn.clientLogger('WebSockets _doDisconnect was called');
6142
6149
 
6143
6150
  this._closeSocket();
6144
6151
  }
@@ -6170,6 +6177,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6170
6177
  this.socket.close();
6171
6178
  } catch (e) {
6172
6179
  Strophe.debug(e.message);
6180
+ if (this._conn.clientLogger) this._conn.clientLogger(e.message);
6173
6181
  }
6174
6182
  }
6175
6183
 
@@ -6205,6 +6213,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6205
6213
  // dispatch a CONNFAIL status update to be consistent with the
6206
6214
  // behavior on other browsers.
6207
6215
  Strophe.error("Websocket closed unexcectedly");
6216
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket closed unexcectedly');
6208
6217
 
6209
6218
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6210
6219
 
@@ -6261,6 +6270,7 @@ Strophe.Websocket = /*#__PURE__*/function () {
6261
6270
  key: "_onError",
6262
6271
  value: function _onError(error) {
6263
6272
  Strophe.error("Websocket error " + error);
6273
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket error ' + error);
6264
6274
 
6265
6275
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6266
6276
 
@@ -6498,8 +6508,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6498
6508
  };
6499
6509
 
6500
6510
  this.worker.port.postMessage(['_connect', this._conn.service, this._conn.jid]);
6501
-
6502
- this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6511
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6503
6512
  }
6504
6513
  }, {
6505
6514
  key: "_attach",
@@ -6560,6 +6569,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6560
6569
  value: function _onClose(e) {
6561
6570
  if (this._conn.connected && !this._conn.disconnecting) {
6562
6571
  Strophe.error("Websocket closed unexpectedly");
6572
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6563
6573
 
6564
6574
  this._conn._doDisconnect();
6565
6575
  } else if (e && e.code === 1006 && !this._conn.connected) {
@@ -6568,6 +6578,7 @@ Strophe.WorkerWebsocket = /*#__PURE__*/function (_Strophe$Websocket) {
6568
6578
  // dispatch a CONNFAIL status update to be consistent with the
6569
6579
  // behavior on other browsers.
6570
6580
  Strophe.error("Websocket closed unexcectedly");
6581
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6571
6582
 
6572
6583
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6573
6584
 
@@ -2900,6 +2900,8 @@
2900
2900
  error.name = 'StropheSessionError';
2901
2901
  throw error;
2902
2902
  }
2903
+
2904
+ if (this.clientLogger) this.clientLogger('Strophe call unexpected method restore.');
2903
2905
  }
2904
2906
  /** PrivateFunction: _sessionCachingSupported
2905
2907
  * Checks whether sessionStorage and JSON are supported and whether we're
@@ -3260,6 +3262,7 @@
3260
3262
  this._idleTimeout = setTimeout(function () {
3261
3263
  return _this5._onIdle();
3262
3264
  }, 100);
3265
+ if (this.clientLogger) this.clientLogger('Strophe _sendRestart method is called.');
3263
3266
  }
3264
3267
  /** Function: addTimedHandler
3265
3268
  * Add a timed handler to the connection.
@@ -3466,8 +3469,10 @@
3466
3469
 
3467
3470
  if (reason) {
3468
3471
  Strophe.warn("Disconnect was called because: " + reason);
3472
+ if (this.clientLogger) this.clientLogger('Disconnect was called because: ' + reason);
3469
3473
  } else {
3470
3474
  Strophe.info("Disconnect was called");
3475
+ if (this.clientLogger) this.clientLogger('Disconnect was called');
3471
3476
  }
3472
3477
 
3473
3478
  if (this.connected) {
@@ -3487,6 +3492,7 @@
3487
3492
  this._proto._disconnect(pres);
3488
3493
  } else {
3489
3494
  Strophe.warn("Disconnect was called before Strophe connected to the server");
3495
+ if (this.clientLogger) this.clientLogger('Disconnect was called before Strophe connected to the server');
3490
3496
 
3491
3497
  this._proto._abortAllRequests();
3492
3498
 
@@ -6152,7 +6158,7 @@
6152
6158
  return _this._onInitialMessage(message);
6153
6159
  };
6154
6160
 
6155
- this._conn.clientLogger('_connect method was called with WebSocket protocol');
6161
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket protocol');
6156
6162
  }
6157
6163
  /** PrivateFunction: _connect_cb
6158
6164
  * _Private_ function called by Strophe.Connection._connect_cb
@@ -6344,6 +6350,7 @@
6344
6350
  key: "_doDisconnect",
6345
6351
  value: function _doDisconnect() {
6346
6352
  Strophe.debug("WebSockets _doDisconnect was called");
6353
+ if (this._conn.clientLogger) this._conn.clientLogger('WebSockets _doDisconnect was called');
6347
6354
 
6348
6355
  this._closeSocket();
6349
6356
  }
@@ -6375,6 +6382,7 @@
6375
6382
  this.socket.close();
6376
6383
  } catch (e) {
6377
6384
  Strophe.debug(e.message);
6385
+ if (this._conn.clientLogger) this._conn.clientLogger(e.message);
6378
6386
  }
6379
6387
  }
6380
6388
 
@@ -6410,6 +6418,7 @@
6410
6418
  // dispatch a CONNFAIL status update to be consistent with the
6411
6419
  // behavior on other browsers.
6412
6420
  Strophe.error("Websocket closed unexcectedly");
6421
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket closed unexcectedly');
6413
6422
 
6414
6423
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6415
6424
 
@@ -6466,6 +6475,7 @@
6466
6475
  key: "_onError",
6467
6476
  value: function _onError(error) {
6468
6477
  Strophe.error("Websocket error " + error);
6478
+ if (this._conn.clientLogger) this._conn.clientLogger('Websocket error ' + error);
6469
6479
 
6470
6480
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6471
6481
 
@@ -6703,8 +6713,7 @@
6703
6713
  };
6704
6714
 
6705
6715
  this.worker.port.postMessage(['_connect', this._conn.service, this._conn.jid]);
6706
-
6707
- this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6716
+ if (this._conn.clientLogger) this._conn.clientLogger('_connect method was called with WebSocket worker protocol');
6708
6717
  }
6709
6718
  }, {
6710
6719
  key: "_attach",
@@ -6765,6 +6774,7 @@
6765
6774
  value: function _onClose(e) {
6766
6775
  if (this._conn.connected && !this._conn.disconnecting) {
6767
6776
  Strophe.error("Websocket closed unexpectedly");
6777
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6768
6778
 
6769
6779
  this._conn._doDisconnect();
6770
6780
  } else if (e && e.code === 1006 && !this._conn.connected) {
@@ -6773,6 +6783,7 @@
6773
6783
  // dispatch a CONNFAIL status update to be consistent with the
6774
6784
  // behavior on other browsers.
6775
6785
  Strophe.error("Websocket closed unexcectedly");
6786
+ if (this._conn.clientLogger) this._conn.clientLogger("Websocket closed unexpectedly");
6776
6787
 
6777
6788
  this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
6778
6789