Browse Source

fix: Adjust log levels.

dev0
damencho 8 months ago
parent
commit
d413f971c5

+ 1
- 1
JitsiConferenceEventManager.js View File

@@ -500,7 +500,7 @@ JitsiConferenceEventManager.prototype.setupRTCListeners = function() {
500 500
         const key = 'data.channel.opened';
501 501
 
502 502
         // TODO: Move all of the 'connectionTimes' logic to its own module.
503
-        logger.log(`(TIME) ${key}:\t`, now);
503
+        logger.info(`(TIME) ${key}:\t`, now);
504 504
         conference.room.connectionTimes[key] = now;
505 505
         Statistics.sendAnalytics(
506 506
             createConnectionStageReachedEvent(key, { value: now }));

+ 2
- 2
modules/RTC/BridgeChannel.ts View File

@@ -250,7 +250,7 @@ export default class BridgeChannel {
250 250
      * @param {number} value The new value for lastN. -1 means unlimited.
251 251
      */
252 252
     sendSetLastNMessage(value: number): void {
253
-        logger.log(`Sending lastN=${value}.`);
253
+        logger.debug(`Sending lastN=${value}.`);
254 254
 
255 255
         this._send({
256 256
             colibriClass: 'LastNChangedEvent',
@@ -264,7 +264,7 @@ export default class BridgeChannel {
264 264
      * @param {ReceiverVideoConstraints} constraints video constraints.
265 265
      */
266 266
     sendReceiverVideoConstraintsMessage(constraints: ReceiverVideoConstraints): void {
267
-        logger.log(`Sending ReceiverVideoConstraints with ${JSON.stringify(constraints)}`);
267
+        logger.info(`Sending ReceiverVideoConstraints with ${JSON.stringify(constraints)}`);
268 268
         this._send({
269 269
             colibriClass: 'ReceiverVideoConstraints',
270 270
             ...constraints

+ 2
- 2
modules/RTC/RTCUtils.js View File

@@ -347,7 +347,7 @@ class RTCUtils extends Listenable {
347 347
 
348 348
             navigator.mediaDevices.getUserMedia(constraints)
349 349
                 .then(stream => {
350
-                    logger.log('onUserMediaSuccess');
350
+                    logger.info('onUserMediaSuccess');
351 351
                     this._updateGrantedPermissions(umDevices, stream);
352 352
                     if (!timeoutExpired) {
353 353
                         if (typeof gumTimeout !== 'undefined') {
@@ -789,7 +789,7 @@ class RTCUtils extends Listenable {
789 789
                 audioOutputDeviceId = deviceId;
790 790
                 audioOutputChanged = true;
791 791
 
792
-                logger.log(`Audio output device set to ${deviceId}`);
792
+                logger.debug(`Audio output device set to ${deviceId}`);
793 793
 
794 794
                 this.eventEmitter.emit(RTCEvents.AUDIO_OUTPUT_DEVICE_CHANGED,
795 795
                     deviceId);

+ 1
- 1
modules/RTC/ScreenObtainer.js View File

@@ -57,7 +57,7 @@ const ScreenObtainer = {
57 57
         } else if (supportsGetDisplayMedia) {
58 58
             return this.obtainScreenFromGetDisplayMedia;
59 59
         }
60
-        logger.log('Screen sharing not supported on ', browser.getName());
60
+        logger.info('Screen sharing not supported on ', browser.getName());
61 61
 
62 62
         return null;
63 63
     },

+ 5
- 5
modules/detection/VADReportingService.ts View File

@@ -70,7 +70,7 @@ export default class VADReportingService extends EventEmitter {
70 70
          */
71 71
         this._intervalId = null;
72 72
 
73
-        logger.log(`Constructed VADReportingService with publish interval of: ${intervalDelay}`);
73
+        logger.debug(`Constructed VADReportingService with publish interval of: ${intervalDelay}`);
74 74
     }
75 75
 
76 76
     /**
@@ -103,7 +103,7 @@ export default class VADReportingService extends EventEmitter {
103 103
 
104 104
         // Create a TrackVADEmitter for each provided audio input device.
105 105
         for (const micDevice of audioDeviceList) {
106
-            logger.log(`Initializing VAD context for mic: ${micDevice.label} -> ${micDevice.deviceId}`);
106
+            logger.debug(`Initializing VAD context for mic: ${micDevice.label} -> ${micDevice.deviceId}`);
107 107
 
108 108
             const emitterPromise = createVADProcessor()
109 109
             .then(rnnoiseProcessor =>
@@ -175,7 +175,7 @@ export default class VADReportingService extends EventEmitter {
175 175
      * @returns {void}.
176 176
      */
177 177
     _startPublish(): void {
178
-        logger.log('VADReportingService started publishing.');
178
+        logger.debug('VADReportingService started publishing.');
179 179
         this._intervalId = setInterval(() => {
180 180
             this._reportVadScore();
181 181
         }, this._intervalDelay);
@@ -213,7 +213,7 @@ export default class VADReportingService extends EventEmitter {
213 213
             });
214 214
         }
215 215
 
216
-        logger.log('VADReportingService reported.', vadComputeScoreArray);
216
+        logger.debug('VADReportingService reported.', vadComputeScoreArray);
217 217
 
218 218
         /**
219 219
          * Once the computation for all the tracked devices is done, fire an event containing all the necessary
@@ -257,7 +257,7 @@ export default class VADReportingService extends EventEmitter {
257 257
             return;
258 258
         }
259 259
 
260
-        logger.log('Destroying VADReportingService.');
260
+        logger.debug('Destroying VADReportingService.');
261 261
 
262 262
         if (this._intervalId) {
263 263
             clearInterval(this._intervalId);

+ 2
- 2
modules/settings/Settings.ts View File

@@ -104,7 +104,7 @@ const Settings: ISettings = {
104 104
 function _generateStatsId() {
105 105
     const username = generateUsername();
106 106
 
107
-    logger.log('generated stats id', username);
107
+    logger.info('generated stats id', username);
108 108
 
109 109
     return username;
110 110
 }
@@ -116,7 +116,7 @@ function _generateStatsId() {
116 116
 function generateJitsiMeetId(): string {
117 117
     const jitsiMeetId = uuidv4().replaceAll('-', '');
118 118
 
119
-    logger.log('generated id', jitsiMeetId);
119
+    logger.info('generated id', jitsiMeetId);
120 120
 
121 121
     return jitsiMeetId;
122 122
 }

+ 1
- 1
modules/statistics/statistics.js View File

@@ -394,7 +394,7 @@ Statistics.sendAnalyticsAndLog = function(event, properties = {}) {
394 394
         };
395 395
     }
396 396
 
397
-    logger.log(JSON.stringify(eventToLog));
397
+    logger.debug(JSON.stringify(eventToLog));
398 398
 
399 399
     // We do this last, because it may modify the object which is passed.
400 400
     this.analytics.sendEvent(event, properties);

+ 12
- 12
modules/xmpp/ChatRoom.js View File

@@ -316,7 +316,7 @@ export default class ChatRoom extends Listenable {
316 316
      * we want to leave the room.
317 317
      */
318 318
     doLeave(reason) {
319
-        logger.log('do leave', this.myroomjid);
319
+        logger.info('do leave', this.myroomjid);
320 320
         const pres = $pres({
321 321
             to: this.myroomjid,
322 322
             type: 'unavailable'
@@ -628,7 +628,7 @@ export default class ChatRoom extends Listenable {
628 628
         if (!this.joined && !this.inProgressEmitted) {
629 629
             const now = this.connectionTimes['muc.join.started'] = window.performance.now();
630 630
 
631
-            logger.log('(TIME) MUC join started:\t', now);
631
+            logger.info('(TIME) MUC join started:\t', now);
632 632
 
633 633
             this.eventEmitter.emit(XMPPEvents.MUC_JOIN_IN_PROGRESS);
634 634
             this.inProgressEmitted = true;
@@ -649,7 +649,7 @@ export default class ChatRoom extends Listenable {
649 649
                 const now = this.connectionTimes['muc.joined']
650 650
                     = window.performance.now();
651 651
 
652
-                logger.log('(TIME) MUC joined:\t', now);
652
+                logger.info('(TIME) MUC joined:\t', now);
653 653
 
654 654
                 // set correct initial state of locked
655 655
                 if (this.password) {
@@ -697,7 +697,7 @@ export default class ChatRoom extends Listenable {
697 697
         } else if (this.members[from] === undefined) {
698 698
             // new participant
699 699
             this.members[from] = member;
700
-            logger.log('entered', from, member);
700
+            logger.info('entered', from, member);
701 701
             hasStatusUpdate = member.status !== undefined;
702 702
             hasVersionUpdate = member.version !== undefined;
703 703
             if (member.isFocus) {
@@ -1234,7 +1234,7 @@ export default class ChatRoom extends Listenable {
1234 1234
             if (subjectText || subjectText === '') {
1235 1235
                 this.subject = subjectText.trim();
1236 1236
                 this.eventEmitter.emit(XMPPEvents.SUBJECT_CHANGED, subjectText);
1237
-                logger.log(`Subject is changed to ${subjectText}`);
1237
+                logger.info(`Subject is changed to ${subjectText}`);
1238 1238
             }
1239 1239
         }
1240 1240
 
@@ -1334,7 +1334,7 @@ export default class ChatRoom extends Listenable {
1334 1334
                         + '>not-authorized['
1335 1335
                         + 'xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]')
1336 1336
                 .length) {
1337
-            logger.log('on password required', from);
1337
+            logger.debug('on password required', from);
1338 1338
             this.eventEmitter.emit(XMPPEvents.PASSWORD_REQUIRED);
1339 1339
         } else if ($(pres)
1340 1340
                 .find(
@@ -1444,8 +1444,8 @@ export default class ChatRoom extends Listenable {
1444 1444
 
1445 1445
         this.connection.sendIQ(
1446 1446
             grantIQ,
1447
-            result => logger.log('Set affiliation of participant with jid: ', jid, 'to', affiliation, result),
1448
-            error => logger.log('Set affiliation of participant error: ', error));
1447
+            result => logger.info('Set affiliation of participant with jid: ', jid, 'to', affiliation, result),
1448
+            error => logger.error('Set affiliation of participant error: ', error));
1449 1449
     }
1450 1450
 
1451 1451
     /**
@@ -1463,8 +1463,8 @@ export default class ChatRoom extends Listenable {
1463 1463
 
1464 1464
         this.connection.sendIQ(
1465 1465
             kickIQ,
1466
-            result => logger.log('Kick participant with jid: ', jid, result),
1467
-            error => logger.log('Kick participant error: ', error));
1466
+            result => logger.info('Kick participant with jid: ', jid, result),
1467
+            error => logger.error('Kick participant error: ', error));
1468 1468
     }
1469 1469
 
1470 1470
     /* eslint-disable max-params */
@@ -1925,8 +1925,8 @@ export default class ChatRoom extends Listenable {
1925 1925
 
1926 1926
         this.connection.sendIQ(
1927 1927
             iqToFocus,
1928
-            result => logger.log('set mute', result),
1929
-            error => logger.log('set mute error', error));
1928
+            result => logger.info('set mute', result),
1929
+            error => logger.error('set mute error', error));
1930 1930
     }
1931 1931
 
1932 1932
     /**

+ 7
- 7
modules/xmpp/JingleSessionPC.js View File

@@ -383,7 +383,7 @@ export default class JingleSessionPC extends JingleSession {
383 383
                 return;
384 384
             }
385 385
 
386
-            logger.log(`${this} Processing ${logPrefix}`);
386
+            logger.debug(`${this} Processing ${logPrefix}`);
387 387
 
388 388
             const currentRemoteSdp = new SDP(this.peerconnection.remoteDescription.sdp, this.isP2P);
389 389
             const sourceDescription = this._processSourceMapFromJingle(elem, isAdd);
@@ -414,7 +414,7 @@ export default class JingleSessionPC extends JingleSession {
414 414
             }
415 415
 
416 416
             this._renegotiate(currentRemoteSdp.raw).then(() => {
417
-                logger.log(`${this} ${logPrefix} - OK`);
417
+                logger.debug(`${this} ${logPrefix} - OK`);
418 418
                 finishedCallback();
419 419
             }, error => {
420 420
                 logger.error(`${this} ${logPrefix} failed:`, error);
@@ -779,7 +779,7 @@ export default class JingleSessionPC extends JingleSession {
779 779
                 this._sendIceCandidates([ candidate ]);
780 780
             }
781 781
         } else {
782
-            logger.log(`${this} _sendIceCandidate: last candidate`);
782
+            logger.debug(`${this} _sendIceCandidate: last candidate`);
783 783
 
784 784
             // FIXME: remember to re-think in ICE-restart
785 785
             this.lasticecandidate = true;
@@ -799,7 +799,7 @@ export default class JingleSessionPC extends JingleSession {
799 799
             return;
800 800
         }
801 801
 
802
-        logger.log(`${this} _sendIceCandidates ${JSON.stringify(candidates)}`);
802
+        logger.debug(`${this} _sendIceCandidates count: ${candidates?.length}`);
803 803
         const cand = $iq({ to: this.remoteJid,
804 804
             type: 'set' })
805 805
             .c('jingle', { xmlns: 'urn:xmpp:jingle:1',
@@ -861,7 +861,7 @@ export default class JingleSessionPC extends JingleSession {
861 861
 
862 862
         // might merge last-candidate notification into this, but it is called
863 863
         // a lot later. See webrtc issue #2340
864
-        // logger.log('was this the last candidate', this.lasticecandidate);
864
+        // logger.debug('was this the last candidate', this.lasticecandidate);
865 865
         this.connection.sendIQ(
866 866
             cand, null, this.newJingleErrorHandler(cand), IQ_TIMEOUT);
867 867
     }
@@ -1366,7 +1366,7 @@ export default class JingleSessionPC extends JingleSession {
1366 1366
                     `ice.state.${this.peerconnection.iceConnectionState}`]
1367 1367
                     = now;
1368 1368
             }
1369
-            logger.log(`(TIME) ICE ${this.peerconnection.iceConnectionState} ${this.isP2P ? 'P2P' : 'JVB'}:\t`, now);
1369
+            logger.info(`(TIME) ICE ${this.peerconnection.iceConnectionState} ${this.isP2P ? 'P2P' : 'JVB'}:\t`, now);
1370 1370
 
1371 1371
             Statistics.sendAnalytics(
1372 1372
                 ICE_STATE_CHANGED,
@@ -1466,7 +1466,7 @@ export default class JingleSessionPC extends JingleSession {
1466 1466
         this.peerconnection.onconnectionstatechange = () => {
1467 1467
             const icestate = this.peerconnection.iceConnectionState;
1468 1468
 
1469
-            logger.log(`(TIME) ${this.isP2P ? 'P2P' : 'JVB'} PC state is now ${this.peerconnection.connectionState} `
1469
+            logger.info(`(TIME) ${this.isP2P ? 'P2P' : 'JVB'} PC state is now ${this.peerconnection.connectionState} `
1470 1470
                 + `(ICE state ${this.peerconnection.iceConnectionState}):\t`, window.performance.now());
1471 1471
 
1472 1472
             switch (this.peerconnection.connectionState) {

+ 2
- 2
modules/xmpp/strophe.jingle.js View File

@@ -178,7 +178,7 @@ export default class JingleConnectionPlugin extends ConnectionPlugin {
178 178
 
179 179
         switch (action) {
180 180
         case 'session-initiate': {
181
-            logger.log('(TIME) received session-initiate:\t', now);
181
+            logger.info('(TIME) received session-initiate:\t', now);
182 182
             const startMuted = $(iq).find('jingle>startmuted');
183 183
 
184 184
             isP2P && logger.debug(`Received ${action} from ${fromJid}`);
@@ -235,7 +235,7 @@ export default class JingleConnectionPlugin extends ConnectionPlugin {
235 235
             break;
236 236
         }
237 237
         case 'session-terminate': {
238
-            logger.log('terminating...', sess.sid);
238
+            logger.info('terminating...', sess.sid);
239 239
             let reasonCondition = null;
240 240
             let reasonText = null;
241 241
 

+ 2
- 2
modules/xmpp/xmpp.js View File

@@ -309,7 +309,7 @@ export default class XMPP extends Listenable {
309 309
         const statusStr = Strophe.getStatusString(status).toLowerCase();
310 310
 
311 311
         this.connectionTimes[statusStr] = now;
312
-        logger.log(
312
+        logger.info(
313 313
             `(TIME) Strophe ${statusStr}${msg ? `[${msg}]` : ''}:\t`,
314 314
             now);
315 315
 
@@ -649,7 +649,7 @@ export default class XMPP extends Listenable {
649 649
 
650 650
         const now = this.connectionTimes.attaching = window.performance.now();
651 651
 
652
-        logger.log('(TIME) Strophe Attaching:\t', now);
652
+        logger.info('(TIME) Strophe Attaching:\t', now);
653 653
         this.connection.attach(options.jid, options.sid,
654 654
             parseInt(options.rid, 10) + 1,
655 655
             this.connectionHandler.bind(this, {

Loading…
Cancel
Save