瀏覽代碼

ref(JitsiMeetLogStorage): move to base/logging

master
paweldomas 6 年之前
父節點
當前提交
8fe5814831

+ 1
- 2
modules/UI/shared_video/SharedVideo.js 查看文件

301
 
301
 
302
                 // FIXME The cat is out of the bag already or rather _room is
302
                 // FIXME The cat is out of the bag already or rather _room is
303
                 // not private because it is used in multiple other places
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
                 conference: APP.conference._room,
305
                 conference: APP.conference._room,
307
                 id: self.url,
306
                 id: self.url,
308
                 isFakeParticipant: true,
307
                 isFakeParticipant: true,

modules/util/JitsiMeetInMemoryLogStorage.js → react/features/base/logging/JitsiMeetInMemoryLogStorage.js 查看文件

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

modules/util/JitsiMeetLogStorage.js → react/features/base/logging/JitsiMeetLogStorage.js 查看文件

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
 export default class JitsiMeetLogStorage {
8
 export default class JitsiMeetLogStorage {
9
 
9
 
10
     /**
10
     /**
11
      * Creates new <tt>JitsiMeetLogStorage</tt>.
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
     constructor(getState) {
15
     constructor(getState) {
16
         /**
16
         /**
33
      * A conference is considered joined when the 'conference' field is defined
33
      * A conference is considered joined when the 'conference' field is defined
34
      * in the base/conference state.
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
      * <tt>false</tt> otherwise.
37
      * <tt>false</tt> otherwise.
38
      */
38
      */
39
     isReady() {
39
     isReady() {
45
     /**
45
     /**
46
      * Called by the <tt>LogCollector</tt> to store a series of log lines into
46
      * Called by the <tt>LogCollector</tt> to store a series of log lines into
47
      * batch.
47
      * batch.
48
-     * @param {string|object[]}logEntries an array containing strings
48
+     *
49
+     * @param {Array<string|Object>} logEntries - An array containing strings
49
      * representing log lines or aggregated lines objects.
50
      * representing log lines or aggregated lines objects.
51
+     * @returns {void}
50
      */
52
      */
51
     storeLogs(logEntries) {
53
     storeLogs(logEntries) {
52
         const conference = getCurrentConference(this.getState());
54
         const conference = getCurrentConference(this.getState());

+ 2
- 4
react/features/base/logging/middleware.js 查看文件

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

Loading…
取消
儲存