From 94bd6bc3306c9dcfb5fbd5644147842a45415aba Mon Sep 17 00:00:00 2001 From: paweldomas Date: Wed, 23 Nov 2016 08:33:55 -0600 Subject: [PATCH] feat(logging_config): add "disableLogCollector" option --- app.js | 8 +++++--- logging_config.js | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 7b48bddce..38f19ff61 100644 --- a/app.js +++ b/app.js @@ -162,7 +162,7 @@ const APP = { // Adjust logging level configureLoggingLevels(); // Start the LogCollector and register it as the global log transport - if (!this.logCollector) { + if (!this.logCollector && !loggingConfig.disableLogCollector) { this.logCollector = new LogCollector({ storeLogs: (logJSON) => { // Try catch was used, because there are many variables @@ -211,8 +211,10 @@ function init() { if (isUIReady) { // Start the LogCollector's periodic "store logs" task only if we're in // the conference and not on the welcome page. - APP.logCollector.start(); - APP.logCollectorStarted = true; + if (APP.logCollector) { + APP.logCollector.start(); + APP.logCollectorStarted = true; + } APP.conference.init({roomName: buildRoomName()}).then(function () { diff --git a/logging_config.js b/logging_config.js index 00cefdf32..ab2ef1d76 100644 --- a/logging_config.js +++ b/logging_config.js @@ -2,6 +2,8 @@ var loggingConfig = { // eslint-disable-line no-unused-vars //default log level for the app and lib-jitsi-meet //defaultLogLevel: 'trace', + // Option to disable LogCollector (which stores the logs on CallStats) + //disableLogCollector: true, // Examples: //'modules/version/ComponentsVersions.js': 'info', //'modules/xmpp/ChatRoom.js': 'log'