Skip to content

Commit

Permalink
ref: Moves xmpp logs to be accessed from connection. (jitsi#7517)
Browse files Browse the repository at this point in the history
* ref: Moves xmpp logs to be accessed from connection.

In cases where there is no room like pre-join and lobby screen we still want to be able to debug xmpp messages.

* squash: Updates lib-jitsi-meet.
  • Loading branch information
damencho authored Aug 13, 2020
1 parent cdd782a commit 4ca4e24
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
14 changes: 8 additions & 6 deletions conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,13 @@ export default {
}

if (isPrejoinPageEnabled(APP.store.getState())) {
_connectionPromise = connect(roomName);
_connectionPromise = connect(roomName).then(c => {
// we want to initialize it early, in case of errors to be able
// to gather logs
APP.connection = c;

return c;
});

const { tryCreateLocalTracks, errors } = this.createInitialLocalTracks(initialOptions);
const tracks = await tryCreateLocalTracks;
Expand Down Expand Up @@ -1206,10 +1212,6 @@ export default {

// end used by torture

getLogs() {
return room.getLogs();
},

/**
* Download logs, a function that can be called from console while
* debugging.
Expand All @@ -1218,7 +1220,7 @@ export default {
saveLogs(filename = 'meetlog.json') {
// this can be called from console and will not have reference to this
// that's why we reference the global var
const logs = APP.conference.getLogs();
const logs = APP.connection.getLogs();
const data = encodeURIComponent(JSON.stringify(logs, null, ' '));

const elem = document.createElement('a');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"jquery-i18next": "1.2.1",
"js-md5": "0.6.1",
"jwt-decode": "2.2.0",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#372020a71d91eb4911cd3fb76164f2ffa0cd8b2f",
"lib-jitsi-meet": "github:jitsi/lib-jitsi-meet#3ac82faa2d6a0e09428b89409b1c89cce08904bf",
"libflacjs": "github:mmig/libflac.js#93d37e7f811f01cf7d8b6a603e38bd3c3810907d",
"lodash": "4.17.19",
"moment": "2.19.4",
Expand Down

0 comments on commit 4ca4e24

Please sign in to comment.