瀏覽代碼

ref: Moves xmpp logs to be accessed from connection. (#1284)

* 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: Remove getLogs from Conference.

* squash: Fix catch.

* squash: Print the error.
master
Дамян Минков 4 年之前
父節點
當前提交
3ac82faa2d
No account linked to committer's email address
共有 3 個文件被更改,包括 24 次插入24 次删除
  1. 0
    23
      JitsiConference.js
  2. 23
    0
      JitsiConnection.js
  3. 1
    1
      modules/xmpp/xmpp.js

+ 0
- 23
JitsiConference.js 查看文件

@@ -2336,29 +2336,6 @@ JitsiConference.prototype.isStartVideoMuted = function() {
2336 2336
     return this.startVideoMuted;
2337 2337
 };
2338 2338
 
2339
-/**
2340
- * Get object with internal logs.
2341
- */
2342
-JitsiConference.prototype.getLogs = function() {
2343
-    const data = this.xmpp.getJingleLog();
2344
-
2345
-    const metadata = {};
2346
-
2347
-    metadata.time = new Date();
2348
-    metadata.url = window.location.href;
2349
-    metadata.ua = navigator.userAgent;
2350
-
2351
-    const log = this.xmpp.getXmppLog();
2352
-
2353
-    if (log) {
2354
-        metadata.xmpp = log;
2355
-    }
2356
-
2357
-    data.metadata = metadata;
2358
-
2359
-    return data;
2360
-};
2361
-
2362 2339
 /**
2363 2340
  * Returns measured connectionTimes.
2364 2341
  */

+ 23
- 0
JitsiConnection.js 查看文件

@@ -163,3 +163,26 @@ JitsiConnection.prototype.addFeature = function(feature, submit = false) {
163 163
 JitsiConnection.prototype.removeFeature = function(feature, submit = false) {
164 164
     return this.xmpp.caps.removeFeature(feature, submit);
165 165
 };
166
+
167
+/**
168
+ * Get object with internal logs.
169
+ */
170
+JitsiConnection.prototype.getLogs = function() {
171
+    const data = this.xmpp.getJingleLog();
172
+
173
+    const metadata = {};
174
+
175
+    metadata.time = new Date();
176
+    metadata.url = window.location.href;
177
+    metadata.ua = navigator.userAgent;
178
+
179
+    const log = this.xmpp.getXmppLog();
180
+
181
+    if (log) {
182
+        metadata.xmpp = log;
183
+    }
184
+
185
+    data.metadata = metadata;
186
+
187
+    return data;
188
+};

+ 1
- 1
modules/xmpp/xmpp.js 查看文件

@@ -261,7 +261,7 @@ export default class XMPP extends Listenable {
261 261
                                         }
262 262
                                     });
263 263
                                 })
264
-                                .catch(logger.warn('Error getting features from lobby.'));
264
+                                .catch(e => logger.warn('Error getting features from lobby.', e && e.message));
265 265
                         }
266 266
                     });
267 267
 

Loading…
取消
儲存