Bläddra i källkod

ref(JitsiMeetLogStorage): move to base/logging

master
paweldomas 6 år sedan
förälder
incheckning
8fe5814831

+ 1
- 2
modules/UI/shared_video/SharedVideo.js Visa fil

@@ -301,8 +301,7 @@ export default class SharedVideoManager {
301 301
 
302 302
                 // FIXME The cat is out of the bag already or rather _room is
303 303
                 // not private because it is used in multiple other places
304
-                // already such as AbstractPageReloadOverlay and
305
-                // JitsiMeetLogStorage.
304
+                // already such as AbstractPageReloadOverlay.
306 305
                 conference: APP.conference._room,
307 306
                 id: self.url,
308 307
                 isFakeParticipant: true,

modules/util/JitsiMeetInMemoryLogStorage.js → react/features/base/logging/JitsiMeetInMemoryLogStorage.js Visa fil

@@ -1,12 +1,11 @@
1 1
 /**
2 2
  * Implements in memory logs storage, used for testing/debugging.
3 3
  *
4
- * FIXME: move to base/logging
5 4
  */
6 5
 export default class JitsiMeetInMemoryLogStorage {
7 6
 
8 7
     /**
9
-     * Creates new <tt>JitsiMeetInMemoryLogStorage</tt>
8
+     * Creates new <tt>JitsiMeetInMemoryLogStorage</tt>.
10 9
      */
11 10
     constructor() {
12 11
         /**
@@ -17,6 +16,8 @@ export default class JitsiMeetInMemoryLogStorage {
17 16
     }
18 17
 
19 18
     /**
19
+     * Checks if this storage instance is ready.
20
+     *
20 21
      * @returns {boolean} <tt>true</tt> when this storage is ready or
21 22
      * <tt>false</tt> otherwise.
22 23
      */
@@ -27,8 +28,10 @@ export default class JitsiMeetInMemoryLogStorage {
27 28
     /**
28 29
      * Called by the <tt>LogCollector</tt> to store a series of log lines into
29 30
      * batch.
30
-     * @param {string|object[]} logEntries an array containing strings
31
+     *
32
+     * @param {string|Object[]} logEntries - An array containing strings
31 33
      * representing log lines or aggregated lines objects.
34
+     * @returns {void}
32 35
      */
33 36
     storeLogs(logEntries) {
34 37
         for (let i = 0, len = logEntries.length; i < len; i++) {
@@ -44,7 +47,9 @@ export default class JitsiMeetInMemoryLogStorage {
44 47
     }
45 48
 
46 49
     /**
47
-     * @returns {array} the collected log entries.
50
+     * Returns the logs stored in the memory.
51
+     *
52
+     * @returns {Array<string>} The collected log entries.
48 53
      */
49 54
     getLogs() {
50 55
         return this.logs;

modules/util/JitsiMeetLogStorage.js → react/features/base/logging/JitsiMeetLogStorage.js Visa fil

@@ -1,16 +1,16 @@
1
-import { getCurrentConference } from '../../react/features/base/conference';
1
+
2
+import { getCurrentConference } from '../conference';
2 3
 
3 4
 /**
4
- * Implements logs storage through the CallStats.
5
- *
6
- * FIXME: move to base/logging
5
+ * Implements log storage interface from the jitsi-meet-logger lib. Captured
6
+ * logs are sent to CallStats.
7 7
  */
8 8
 export default class JitsiMeetLogStorage {
9 9
 
10 10
     /**
11 11
      * Creates new <tt>JitsiMeetLogStorage</tt>.
12 12
      *
13
-     * @param {Function} getState - the Redux store's {@code getState} method.
13
+     * @param {Function} getState - The Redux store's {@code getState} method.
14 14
      */
15 15
     constructor(getState) {
16 16
         /**
@@ -33,7 +33,7 @@ export default class JitsiMeetLogStorage {
33 33
      * A conference is considered joined when the 'conference' field is defined
34 34
      * in the base/conference state.
35 35
      *
36
-     * @return {boolean} <tt>true</tt> when this storage is ready or
36
+     * @returns {boolean} <tt>true</tt> when this storage is ready or
37 37
      * <tt>false</tt> otherwise.
38 38
      */
39 39
     isReady() {
@@ -45,8 +45,10 @@ export default class JitsiMeetLogStorage {
45 45
     /**
46 46
      * Called by the <tt>LogCollector</tt> to store a series of log lines into
47 47
      * batch.
48
-     * @param {string|object[]}logEntries an array containing strings
48
+     *
49
+     * @param {Array<string|Object>} logEntries - An array containing strings
49 50
      * representing log lines or aggregated lines objects.
51
+     * @returns {void}
50 52
      */
51 53
     storeLogs(logEntries) {
52 54
         const conference = getCurrentConference(this.getState());

+ 2
- 4
react/features/base/logging/middleware.js Visa fil

@@ -10,14 +10,12 @@ import JitsiMeetJS, {
10 10
 } from '../lib-jitsi-meet';
11 11
 import { MiddlewareRegistry } from '../redux';
12 12
 
13
-import JitsiMeetInMemoryLogStorage
14
-    from '../../../../modules/util/JitsiMeetInMemoryLogStorage';
15
-import JitsiMeetLogStorage from '../../../../modules/util/JitsiMeetLogStorage';
16
-
17 13
 import { isTestModeEnabled } from '../testing';
18 14
 
19 15
 import { setLogCollector } from './actions';
20 16
 import { SET_LOGGING_CONFIG } from './actionTypes';
17
+import JitsiMeetLogStorage from './JitsiMeetLogStorage';
18
+import JitsiMeetInMemoryLogStorage from './JitsiMeetInMemoryLogStorage';
21 19
 
22 20
 declare var APP: Object;
23 21
 

Laddar…
Avbryt
Spara