Pārlūkot izejas kodu

fix(RTC): Fix log formatting

dev1
Jaya Allamsetty 5 gadus atpakaļ
vecāks
revīzija
3bfdb98e3b
2 mainītis faili ar 6 papildinājumiem un 10 dzēšanām
  1. 1
    1
      modules/RTC/RTC.js
  2. 5
    9
      modules/RTC/RTCUtils.js

+ 1
- 1
modules/RTC/RTC.js Parādīt failu

349
      * @private
349
      * @private
350
      */
350
      */
351
     _senderVideoConstraintsChanged(senderVideoConstraints) {
351
     _senderVideoConstraintsChanged(senderVideoConstraints) {
352
-        logger.info(`Received remote max frame height of ${senderVideoConstraints} on the bridge channel`);
352
+        logger.info('Remote max frame height received on bridge channel: ', JSON.stringify(senderVideoConstraints));
353
         this._senderVideoConstraints = senderVideoConstraints;
353
         this._senderVideoConstraints = senderVideoConstraints;
354
         this.eventEmitter.emit(RTCEvents.SENDER_VIDEO_CONSTRAINTS_CHANGED);
354
         this.eventEmitter.emit(RTCEvents.SENDER_VIDEO_CONSTRAINTS_CHANGED);
355
     }
355
     }

+ 5
- 9
modules/RTC/RTCUtils.js Parādīt failu

659
  */
659
  */
660
 function onMediaDevicesListChanged(devicesReceived) {
660
 function onMediaDevicesListChanged(devicesReceived) {
661
     availableDevices = devicesReceived.slice(0);
661
     availableDevices = devicesReceived.slice(0);
662
-    logger.info(
663
-        'list of media devices has changed:',
664
-        availableDevices);
662
+    logger.info('list of media devices has changed:', availableDevices);
665
 
663
 
666
     sendDeviceListToAnalytics(availableDevices);
664
     sendDeviceListToAnalytics(availableDevices);
667
 
665
 
987
     getUserMediaWithConstraints(um, options = {}) {
985
     getUserMediaWithConstraints(um, options = {}) {
988
         const constraints = getConstraints(um, options);
986
         const constraints = getConstraints(um, options);
989
 
987
 
990
-        logger.info('Get media constraints', constraints);
988
+        logger.info('Get media constraints', JSON.stringify(constraints));
991
 
989
 
992
         return new Promise((resolve, reject) => {
990
         return new Promise((resolve, reject) => {
993
             navigator.mediaDevices.getUserMedia(constraints)
991
             navigator.mediaDevices.getUserMedia(constraints)
997
                 resolve(stream);
995
                 resolve(stream);
998
             })
996
             })
999
             .catch(error => {
997
             .catch(error => {
1000
-                logger.warn('Failed to get access to local media. '
1001
-                    + ` ${error} ${constraints} `);
998
+                logger.warn(`Failed to get access to local media. ${error} ${JSON.stringify(constraints)}`);
1002
                 updateGrantedPermissions(um, undefined);
999
                 updateGrantedPermissions(um, undefined);
1003
                 reject(new JitsiTrackError(error, constraints, um));
1000
                 reject(new JitsiTrackError(error, constraints, um));
1004
             });
1001
             });
1022
                     resolve(stream);
1019
                     resolve(stream);
1023
                 })
1020
                 })
1024
                 .catch(error => {
1021
                 .catch(error => {
1025
-                    logger.warn('Failed to get access to local media. '
1026
-                        + ` ${error} ${constraints} `);
1022
+                    logger.warn(`Failed to get access to local media. ${error} ${JSON.stringify(constraints)}`);
1027
                     updateGrantedPermissions(umDevices, undefined);
1023
                     updateGrantedPermissions(umDevices, undefined);
1028
                     reject(new JitsiTrackError(error, constraints, umDevices));
1024
                     reject(new JitsiTrackError(error, constraints, umDevices));
1029
                 });
1025
                 });
1382
             const constraints = newGetConstraints(
1378
             const constraints = newGetConstraints(
1383
                 requestedCaptureDevices, options);
1379
                 requestedCaptureDevices, options);
1384
 
1380
 
1385
-            logger.info('Got media constraints: ', constraints);
1381
+            logger.info('Got media constraints: ', JSON.stringify(constraints));
1386
 
1382
 
1387
             return this._newGetUserMediaWithConstraints(
1383
             return this._newGetUserMediaWithConstraints(
1388
                 requestedCaptureDevices, constraints);
1384
                 requestedCaptureDevices, constraints);

Notiek ielāde…
Atcelt
Saglabāt