Skip to content

Commit

Permalink
feat(logging_config): add "disableLogCollector" option
Browse files Browse the repository at this point in the history
  • Loading branch information
paweldomas committed Nov 23, 2016
1 parent 36bcc68 commit 94bd6bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 () {

Expand Down
2 changes: 2 additions & 0 deletions logging_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 94bd6bc

Please sign in to comment.