ref(JitsiMeetLogStorage): move to base/logging
This commit is contained in:
parent
2305effa5c
commit
8fe5814831
|
@ -301,8 +301,7 @@ export default class SharedVideoManager {
|
||||||
|
|
||||||
// FIXME The cat is out of the bag already or rather _room is
|
// FIXME The cat is out of the bag already or rather _room is
|
||||||
// not private because it is used in multiple other places
|
// not private because it is used in multiple other places
|
||||||
// already such as AbstractPageReloadOverlay and
|
// already such as AbstractPageReloadOverlay.
|
||||||
// JitsiMeetLogStorage.
|
|
||||||
conference: APP.conference._room,
|
conference: APP.conference._room,
|
||||||
id: self.url,
|
id: self.url,
|
||||||
isFakeParticipant: true,
|
isFakeParticipant: true,
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* Implements in memory logs storage, used for testing/debugging.
|
* Implements in memory logs storage, used for testing/debugging.
|
||||||
*
|
*
|
||||||
* FIXME: move to base/logging
|
|
||||||
*/
|
*/
|
||||||
export default class JitsiMeetInMemoryLogStorage {
|
export default class JitsiMeetInMemoryLogStorage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new <tt>JitsiMeetInMemoryLogStorage</tt>
|
* Creates new <tt>JitsiMeetInMemoryLogStorage</tt>.
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +16,8 @@ export default class JitsiMeetInMemoryLogStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Checks if this storage instance is ready.
|
||||||
|
*
|
||||||
* @returns {boolean} <tt>true</tt> when this storage is ready or
|
* @returns {boolean} <tt>true</tt> when this storage is ready or
|
||||||
* <tt>false</tt> otherwise.
|
* <tt>false</tt> otherwise.
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +28,10 @@ export default class JitsiMeetInMemoryLogStorage {
|
||||||
/**
|
/**
|
||||||
* Called by the <tt>LogCollector</tt> to store a series of log lines into
|
* Called by the <tt>LogCollector</tt> to store a series of log lines into
|
||||||
* batch.
|
* batch.
|
||||||
* @param {string|object[]} logEntries an array containing strings
|
*
|
||||||
|
* @param {string|Object[]} logEntries - An array containing strings
|
||||||
* representing log lines or aggregated lines objects.
|
* representing log lines or aggregated lines objects.
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
storeLogs(logEntries) {
|
storeLogs(logEntries) {
|
||||||
for (let i = 0, len = logEntries.length; i < len; i++) {
|
for (let i = 0, len = logEntries.length; i < len; i++) {
|
||||||
|
@ -44,7 +47,9 @@ export default class JitsiMeetInMemoryLogStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns {array} the collected log entries.
|
* Returns the logs stored in the memory.
|
||||||
|
*
|
||||||
|
* @returns {Array<string>} The collected log entries.
|
||||||
*/
|
*/
|
||||||
getLogs() {
|
getLogs() {
|
||||||
return this.logs;
|
return this.logs;
|
|
@ -1,16 +1,16 @@
|
||||||
import { getCurrentConference } from '../../react/features/base/conference';
|
|
||||||
|
import { getCurrentConference } from '../conference';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements logs storage through the CallStats.
|
* Implements log storage interface from the jitsi-meet-logger lib. Captured
|
||||||
*
|
* logs are sent to CallStats.
|
||||||
* FIXME: move to base/logging
|
|
||||||
*/
|
*/
|
||||||
export default class JitsiMeetLogStorage {
|
export default class JitsiMeetLogStorage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new <tt>JitsiMeetLogStorage</tt>.
|
* Creates new <tt>JitsiMeetLogStorage</tt>.
|
||||||
*
|
*
|
||||||
* @param {Function} getState - the Redux store's {@code getState} method.
|
* @param {Function} getState - The Redux store's {@code getState} method.
|
||||||
*/
|
*/
|
||||||
constructor(getState) {
|
constructor(getState) {
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +33,7 @@ export default class JitsiMeetLogStorage {
|
||||||
* A conference is considered joined when the 'conference' field is defined
|
* A conference is considered joined when the 'conference' field is defined
|
||||||
* in the base/conference state.
|
* in the base/conference state.
|
||||||
*
|
*
|
||||||
* @return {boolean} <tt>true</tt> when this storage is ready or
|
* @returns {boolean} <tt>true</tt> when this storage is ready or
|
||||||
* <tt>false</tt> otherwise.
|
* <tt>false</tt> otherwise.
|
||||||
*/
|
*/
|
||||||
isReady() {
|
isReady() {
|
||||||
|
@ -45,8 +45,10 @@ export default class JitsiMeetLogStorage {
|
||||||
/**
|
/**
|
||||||
* Called by the <tt>LogCollector</tt> to store a series of log lines into
|
* Called by the <tt>LogCollector</tt> to store a series of log lines into
|
||||||
* batch.
|
* batch.
|
||||||
* @param {string|object[]}logEntries an array containing strings
|
*
|
||||||
|
* @param {Array<string|Object>} logEntries - An array containing strings
|
||||||
* representing log lines or aggregated lines objects.
|
* representing log lines or aggregated lines objects.
|
||||||
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
storeLogs(logEntries) {
|
storeLogs(logEntries) {
|
||||||
const conference = getCurrentConference(this.getState());
|
const conference = getCurrentConference(this.getState());
|
|
@ -10,14 +10,12 @@ import JitsiMeetJS, {
|
||||||
} from '../lib-jitsi-meet';
|
} from '../lib-jitsi-meet';
|
||||||
import { MiddlewareRegistry } from '../redux';
|
import { MiddlewareRegistry } from '../redux';
|
||||||
|
|
||||||
import JitsiMeetInMemoryLogStorage
|
|
||||||
from '../../../../modules/util/JitsiMeetInMemoryLogStorage';
|
|
||||||
import JitsiMeetLogStorage from '../../../../modules/util/JitsiMeetLogStorage';
|
|
||||||
|
|
||||||
import { isTestModeEnabled } from '../testing';
|
import { isTestModeEnabled } from '../testing';
|
||||||
|
|
||||||
import { setLogCollector } from './actions';
|
import { setLogCollector } from './actions';
|
||||||
import { SET_LOGGING_CONFIG } from './actionTypes';
|
import { SET_LOGGING_CONFIG } from './actionTypes';
|
||||||
|
import JitsiMeetLogStorage from './JitsiMeetLogStorage';
|
||||||
|
import JitsiMeetInMemoryLogStorage from './JitsiMeetInMemoryLogStorage';
|
||||||
|
|
||||||
declare var APP: Object;
|
declare var APP: Object;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue