Преглед на файлове

feat(logging_config): add "disableLogCollector" option

master
paweldomas преди 9 години
родител
ревизия
94bd6bc330
променени са 2 файла, в които са добавени 7 реда и са изтрити 3 реда
  1. 5
    3
      app.js
  2. 2
    0
      logging_config.js

+ 5
- 3
app.js Целия файл

162
         // Adjust logging level
162
         // Adjust logging level
163
         configureLoggingLevels();
163
         configureLoggingLevels();
164
         // Start the LogCollector and register it as the global log transport
164
         // Start the LogCollector and register it as the global log transport
165
-        if (!this.logCollector) {
165
+        if (!this.logCollector && !loggingConfig.disableLogCollector) {
166
             this.logCollector = new LogCollector({
166
             this.logCollector = new LogCollector({
167
                 storeLogs: (logJSON) => {
167
                 storeLogs: (logJSON) => {
168
                     // Try catch was used, because there are many variables
168
                     // Try catch was used, because there are many variables
211
     if (isUIReady) {
211
     if (isUIReady) {
212
         // Start the LogCollector's periodic "store logs" task only if we're in
212
         // Start the LogCollector's periodic "store logs" task only if we're in
213
         // the conference and not on the welcome page.
213
         // the conference and not on the welcome page.
214
-        APP.logCollector.start();
215
-        APP.logCollectorStarted = true;
214
+        if (APP.logCollector) {
215
+            APP.logCollector.start();
216
+            APP.logCollectorStarted = true;
217
+        }
216
 
218
 
217
         APP.conference.init({roomName: buildRoomName()}).then(function () {
219
         APP.conference.init({roomName: buildRoomName()}).then(function () {
218
 
220
 

+ 2
- 0
logging_config.js Целия файл

2
 var loggingConfig = { // eslint-disable-line no-unused-vars
2
 var loggingConfig = { // eslint-disable-line no-unused-vars
3
     //default log level for the app and lib-jitsi-meet
3
     //default log level for the app and lib-jitsi-meet
4
     //defaultLogLevel: 'trace',
4
     //defaultLogLevel: 'trace',
5
+    // Option to disable LogCollector (which stores the logs on CallStats)
6
+    //disableLogCollector: true,
5
     // Examples:
7
     // Examples:
6
     //'modules/version/ComponentsVersions.js': 'info',
8
     //'modules/version/ComponentsVersions.js': 'info',
7
     //'modules/xmpp/ChatRoom.js': 'log'
9
     //'modules/xmpp/ChatRoom.js': 'log'

Loading…
Отказ
Запис