logging: use individual, names loggers

React Native doesn't define __filename nor __dirname so do it artisanally. In
addition, this helps with centralizing the configuration passed to loggers.
This commit is contained in:
Saúl Ibarra Corretgé 2019-08-21 16:50:00 +02:00 committed by Saúl Ibarra Corretgé
parent bfe4237430
commit 5a934c071a
118 changed files with 330 additions and 139 deletions

View File

@ -5,8 +5,9 @@
import AbstractAudioMuteButton from '../base/toolbox/components/AbstractAudioMuteButton'; import AbstractAudioMuteButton from '../base/toolbox/components/AbstractAudioMuteButton';
import type { Props } from '../base/toolbox/components/AbstractButton'; import type { Props } from '../base/toolbox/components/AbstractButton';
import logger from './logger';
const { api } = window.alwaysOnTop; const { api } = window.alwaysOnTop;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of the React {@code Component} state of {@link AudioMuteButton}. * The type of the React {@code Component} state of {@link AudioMuteButton}.

View File

@ -5,8 +5,9 @@
import AbstractVideoMuteButton from '../base/toolbox/components/AbstractVideoMuteButton'; import AbstractVideoMuteButton from '../base/toolbox/components/AbstractVideoMuteButton';
import type { Props } from '../base/toolbox/components/AbstractButton'; import type { Props } from '../base/toolbox/components/AbstractButton';
import logger from './logger';
const { api } = window.alwaysOnTop; const { api } = window.alwaysOnTop;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of the React {@code Component} state of {@link VideoMuteButton}. * The type of the React {@code Component} state of {@link VideoMuteButton}.

View File

@ -0,0 +1,3 @@
import { getLogger } from '../base/logging/functions';
export default getLogger('features/always-on-top');

View File

@ -7,8 +7,7 @@ import JitsiMeetJS, {
import { getJitsiMeetGlobalNS, loadScript } from '../base/util'; import { getJitsiMeetGlobalNS, loadScript } from '../base/util';
import { AmplitudeHandler } from './handlers'; import { AmplitudeHandler } from './handlers';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Sends an event through the lib-jitsi-meet AnalyticsAdapter interface. * Sends an event through the lib-jitsi-meet AnalyticsAdapter interface.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/analytics');

View File

@ -25,8 +25,7 @@ import {
getDefaultURL, getDefaultURL,
getName getName
} from './functions'; } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object; declare var APP: Object;

View File

@ -27,13 +27,12 @@ import '../../mobile/proximity';
import '../../mobile/wake-lock'; import '../../mobile/wake-lock';
import '../../mobile/watchos'; import '../../mobile/watchos';
import logger from '../logger';
import { AbstractApp } from './AbstractApp'; import { AbstractApp } from './AbstractApp';
import type { Props as AbstractAppProps } from './AbstractApp'; import type { Props as AbstractAppProps } from './AbstractApp';
declare var __DEV__; declare var __DEV__;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of React {@code Component} props of {@link App}. * The type of React {@code Component} props of {@link App}.
*/ */

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/app');

View File

@ -16,8 +16,7 @@ import {
WAIT_FOR_OWNER WAIT_FOR_OWNER
} from './actionTypes'; } from './actionTypes';
import { LoginDialog, WaitForOwnerDialog } from './components'; import { LoginDialog, WaitForOwnerDialog } from './components';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Initiates authenticating and upgrading the role of the local participant to * Initiates authenticating and upgrading the role of the local participant to

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/authentication');

View File

@ -17,8 +17,7 @@ import { SoundCollection } from '../../sounds';
import { PersistenceRegistry } from '../../storage'; import { PersistenceRegistry } from '../../storage';
import { appWillMount, appWillUnmount } from '../actions'; import { appWillMount, appWillUnmount } from '../actions';
import logger from '../logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object; declare var APP: Object;

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/app');

View File

@ -1,18 +1,15 @@
// @flow // @flow
import { getLogger } from 'jitsi-meet-logger';
import UIEvents from '../../../../service/UI/UIEvents'; import UIEvents from '../../../../service/UI/UIEvents';
import { createAudioOnlyChangedEvent, sendAnalytics } from '../../analytics'; import { createAudioOnlyChangedEvent, sendAnalytics } from '../../analytics';
import { SET_AUDIO_ONLY } from './actionTypes'; import { SET_AUDIO_ONLY } from './actionTypes';
import logger from './logger';
import type { Dispatch } from 'redux'; import type { Dispatch } from 'redux';
declare var APP: Object; declare var APP: Object;
const logger = getLogger('features/base/audio-only');
/** /**
* Sets the audio-only flag for the current JitsiConference. * Sets the audio-only flag for the current JitsiConference.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/audio-only');

View File

@ -1,5 +1,7 @@
// @flow // @flow
import type { Dispatch } from 'redux';
import { import {
createStartMutedConfigurationEvent, createStartMutedConfigurationEvent,
sendAnalytics sendAnalytics
@ -58,9 +60,7 @@ import {
getCurrentConference, getCurrentConference,
sendLocalParticipant sendLocalParticipant
} from './functions'; } from './functions';
import type { Dispatch } from 'redux'; import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object; declare var APP: Object;

View File

@ -19,8 +19,7 @@ import {
JITSI_CONFERENCE_URL_KEY, JITSI_CONFERENCE_URL_KEY,
VIDEO_QUALITY_LEVELS VIDEO_QUALITY_LEVELS
} from './constants'; } from './constants';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Attach a set of local tracks to a conference. * Attach a set of local tracks to a conference.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/conference');

View File

@ -41,8 +41,7 @@ import {
forEachConference, forEachConference,
getCurrentConference getCurrentConference
} from './functions'; } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object; declare var APP: Object;

View File

@ -4,6 +4,7 @@ import _ from 'lodash';
import { _CONFIG_STORE_PREFIX } from './constants'; import { _CONFIG_STORE_PREFIX } from './constants';
import parseURLParams from './parseURLParams'; import parseURLParams from './parseURLParams';
import logger from './logger';
declare var $: Object; declare var $: Object;
@ -147,8 +148,6 @@ const WHITELISTED_KEYS = [
'webrtcIceUdpDisable' 'webrtcIceUdpDisable'
]; ];
const logger = require('jitsi-meet-logger').getLogger(__filename);
// XXX The functions getRoomName and parseURLParams are split out of // XXX The functions getRoomName and parseURLParams are split out of
// functions.js because they are bundled in both app.bundle and // functions.js because they are bundled in both app.bundle and
// do_external_connect, webpack 1 does not support tree shaking, and we don't // do_external_connect, webpack 1 does not support tree shaking, and we don't

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/config');

View File

@ -19,8 +19,7 @@ import {
SET_LOCATION_URL SET_LOCATION_URL
} from './actionTypes'; } from './actionTypes';
import { JITSI_CONNECTION_URL_KEY } from './constants'; import { JITSI_CONNECTION_URL_KEY } from './constants';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The error structure passed to the {@link connectionFailed} action. * The error structure passed to the {@link connectionFailed} action.

View File

@ -5,8 +5,6 @@ import type { Dispatch } from 'redux';
declare var APP: Object; declare var APP: Object;
declare var config: Object; declare var config: Object;
const logger = require('jitsi-meet-logger').getLogger(__filename);
import { configureInitialDevices } from '../devices'; import { configureInitialDevices } from '../devices';
export { export {
@ -14,6 +12,7 @@ export {
connectionFailed, connectionFailed,
setLocationURL setLocationURL
} from './actions.native'; } from './actions.native';
import logger from './logger';
/** /**
* Opens new connection. * Opens new connection.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/connection');

View File

@ -20,8 +20,7 @@ import {
getDevicesFromURL, getDevicesFromURL,
setAudioOutputDeviceId setAudioOutputDeviceId
} from './functions'; } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Maps the WebRTC string for device type to the keys used to store configure, * Maps the WebRTC string for device type to the keys used to store configure,

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/devices');

View File

@ -21,8 +21,7 @@ import {
import { showNotification, showWarningNotification } from '../../notifications'; import { showNotification, showWarningNotification } from '../../notifications';
import { updateSettings } from '../settings'; import { updateSettings } from '../settings';
import { setAudioOutputDeviceId } from './functions'; import { setAudioOutputDeviceId } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
const JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP = { const JITSI_TRACK_ERROR_TO_MESSAGE_KEY_MAP = {
microphone: { microphone: {

View File

@ -6,7 +6,7 @@ import React, { Component } from 'react';
import { StatelessDialog } from '../../../dialog'; import { StatelessDialog } from '../../../dialog';
import { translate } from '../../../i18n'; import { translate } from '../../../i18n';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from '../../logger';
/** /**
* The type of the React {@code Component} props of {@link DialogWithTabs}. * The type of the React {@code Component} props of {@link DialogWithTabs}.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/dialog');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/lastn');

View File

@ -1,7 +1,5 @@
// @flow // @flow
import { getLogger } from 'jitsi-meet-logger';
import { SET_FILMSTRIP_ENABLED } from '../../filmstrip/actionTypes'; import { SET_FILMSTRIP_ENABLED } from '../../filmstrip/actionTypes';
import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes'; import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';
import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes'; import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
@ -12,8 +10,9 @@ import { CONFERENCE_JOINED } from '../conference/actionTypes';
import { getParticipantById } from '../participants/functions'; import { getParticipantById } from '../participants/functions';
import { MiddlewareRegistry } from '../redux'; import { MiddlewareRegistry } from '../redux';
import logger from './logger';
declare var APP: Object; declare var APP: Object;
const logger = getLogger('features/base/lastn');
MiddlewareRegistry.register(store => next => action => { MiddlewareRegistry.register(store => next => action => {

View File

@ -4,14 +4,13 @@ import { toState } from '../redux';
import { loadScript } from '../util'; import { loadScript } from '../util';
import JitsiMeetJS from './_'; import JitsiMeetJS from './_';
import logger from './logger';
declare var APP: Object; declare var APP: Object;
const JitsiConferenceErrors = JitsiMeetJS.errors.conference; const JitsiConferenceErrors = JitsiMeetJS.errors.conference;
const JitsiConnectionErrors = JitsiMeetJS.errors.connection; const JitsiConnectionErrors = JitsiMeetJS.errors.connection;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Creates a {@link JitsiLocalTrack} model from the given device id. * Creates a {@link JitsiLocalTrack} model from the given device id.
* *

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/lib-jitsi-meet');

View File

@ -3,7 +3,7 @@
import { NativeModules } from 'react-native'; import { NativeModules } from 'react-native';
import { RTCPeerConnection, RTCSessionDescription } from 'react-native-webrtc'; import { RTCPeerConnection, RTCSessionDescription } from 'react-native-webrtc';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from '../logger';
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */

View File

@ -0,0 +1,22 @@
// @flow
import { getLogger as _getLogger } from 'jitsi-meet-logger';
/**
* Options for building the logger. We disable the callee info on RN because it's
* almost always empty anyway.
*/
const DEFAULT_OPTS = {};
const DEFAULT_RN_OPTS = { disableCallerInfo: true };
/**
* Gets a logger for the given id.
*
* @param {string} id - Name for the logger.
* @returns {Object} - The logger object.
*/
export function getLogger(id: string) {
const opts = navigator.product === 'ReactNative' ? DEFAULT_RN_OPTS : DEFAULT_OPTS;
return _getLogger(id, undefined, opts);
}

View File

@ -1,5 +1,6 @@
export * from './actions'; export * from './actions';
export * from './actionTypes'; export * from './actionTypes';
export * from './functions';
import './middleware'; import './middleware';
import './reducer'; import './reducer';

View File

@ -2,7 +2,7 @@
import { Component } from 'react'; import { Component } from 'react';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from '../logger';
/** /**
* Describes audio element interface used in the base/media feature for audio * Describes audio element interface used in the base/media feature for audio

View File

@ -2,9 +2,9 @@
import Sound from 'react-native-sound'; import Sound from 'react-native-sound';
import AbstractAudio from '../AbstractAudio'; import logger from '../../logger';
const logger = require('jitsi-meet-logger').getLogger(__filename); import AbstractAudio from '../AbstractAudio';
/** /**
* The React Native/mobile {@link Component} which is similar to Web's * The React Native/mobile {@link Component} which is similar to Web's

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/media');

View File

@ -18,13 +18,12 @@ import { setTrackMuted, TRACK_ADDED } from '../tracks';
import { setAudioMuted, setCameraFacingMode, setVideoMuted } from './actions'; import { setAudioMuted, setCameraFacingMode, setVideoMuted } from './actions';
import { CAMERA_FACING_MODE, VIDEO_MUTISM_AUTHORITY } from './constants'; import { CAMERA_FACING_MODE, VIDEO_MUTISM_AUTHORITY } from './constants';
import logger from './logger';
import { import {
_AUDIO_INITIAL_MEDIA_STATE, _AUDIO_INITIAL_MEDIA_STATE,
_VIDEO_INITIAL_MEDIA_STATE _VIDEO_INITIAL_MEDIA_STATE
} from './reducer'; } from './reducer';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Implements the entry point of the middleware of the feature base/media. * Implements the entry point of the middleware of the feature base/media.
* *

View File

@ -5,9 +5,9 @@ import AKInlineDialog from '@atlaskit/inline-dialog';
import _debounce from 'lodash/debounce'; import _debounce from 'lodash/debounce';
import React, { Component } from 'react'; import React, { Component } from 'react';
import InlineDialogFailure from './InlineDialogFailure'; import logger from '../../logger';
const logger = require('jitsi-meet-logger').getLogger(__filename); import InlineDialogFailure from './InlineDialogFailure';
/** /**
* The type of the React {@code Component} props of * The type of the React {@code Component} props of

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/react');

View File

@ -2,7 +2,7 @@
import type { Store } from 'redux'; import type { Store } from 'redux';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* The type listener supported for registration with * The type listener supported for registration with

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/redux');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/settings');

View File

@ -10,8 +10,7 @@ import { PersistenceRegistry } from '../storage';
import { assignIfDefined } from '../util'; import { assignIfDefined } from '../util';
import { SETTINGS_UPDATED } from './actionTypes'; import { SETTINGS_UPDATED } from './actionTypes';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The default/initial redux state of the feature {@code base/settings}. * The default/initial redux state of the feature {@code base/settings}.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/sounds');

View File

@ -3,8 +3,7 @@
import { MiddlewareRegistry } from '../redux'; import { MiddlewareRegistry } from '../redux';
import { PLAY_SOUND, STOP_SOUND } from './actionTypes'; import { PLAY_SOUND, STOP_SOUND } from './actionTypes';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Implements the entry point of the middleware of the feature base/media. * Implements the entry point of the middleware of the feature base/media.

View File

@ -9,8 +9,7 @@ import {
REGISTER_SOUND, REGISTER_SOUND,
UNREGISTER_SOUND UNREGISTER_SOUND
} from './actionTypes'; } from './actionTypes';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The structure use by this reducer to describe a sound. * The structure use by this reducer to describe a sound.

View File

@ -2,7 +2,7 @@
import md5 from 'js-md5'; import md5 from 'js-md5';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* The name of the {@code localStorage} store where the app persists its values. * The name of the {@code localStorage} store where the app persists its values.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/storage');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/testing');

View File

@ -1,14 +1,11 @@
/* @flow */ // @flow
import Logger from 'jitsi-meet-logger';
const logger = Logger.getLogger(__filename);
import { MiddlewareRegistry } from '../redux'; import { MiddlewareRegistry } from '../redux';
import { CONFERENCE_WILL_JOIN } from '../conference'; import { CONFERENCE_WILL_JOIN } from '../conference';
import { JitsiConferenceEvents } from '../lib-jitsi-meet'; import { JitsiConferenceEvents } from '../lib-jitsi-meet';
import { setConnectionState } from './actions'; import { setConnectionState } from './actions';
import logger from './logger';
/** /**
* The Redux middleware of the feature testing. * The Redux middleware of the feature testing.

View File

@ -24,8 +24,7 @@ import {
TRACK_WILL_CREATE TRACK_WILL_CREATE
} from './actionTypes'; } from './actionTypes';
import { createLocalTracksF, getLocalTrack, getLocalTracks, getTrackByJitsiTrack } from './functions'; import { createLocalTracksF, getLocalTrack, getLocalTracks, getTrackByJitsiTrack } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Requests the creating of the desired media type tracks. Desire is expressed * Requests the creating of the desired media type tracks. Desire is expressed

View File

@ -8,7 +8,7 @@ import {
getUserSelectedMicDeviceId getUserSelectedMicDeviceId
} from '../settings'; } from '../settings';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* Create local tracks of specific types. * Create local tracks of specific types.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/tracks');

View File

@ -1,6 +1,6 @@
// @flow // @flow
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* Creates a deferred object. * Creates a deferred object.

View File

@ -1,6 +1,6 @@
import { timeoutPromise } from './timeoutPromise'; import { timeoutPromise } from './timeoutPromise';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* The number of milliseconds before deciding that we need retry a fetch request. * The number of milliseconds before deciding that we need retry a fetch request.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../logging/functions';
export default getLogger('features/base/util');

View File

@ -1,6 +1,6 @@
// @flow // @flow
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* The app linking scheme. * The app linking scheme.

View File

@ -4,8 +4,7 @@ import { getLocalVideoTrack } from '../../features/base/tracks';
import { BLUR_DISABLED, BLUR_ENABLED } from './actionTypes'; import { BLUR_DISABLED, BLUR_ENABLED } from './actionTypes';
import { getBlurEffect } from './functions'; import { getBlurEffect } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Signals the local participant is switching between blurred or non blurred video. * Signals the local participant is switching between blurred or non blurred video.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/blur');

View File

@ -17,11 +17,10 @@ import {
SET_LOADING_CALENDAR_EVENTS SET_LOADING_CALENDAR_EVENTS
} from './actionTypes'; } from './actionTypes';
import { _getCalendarIntegration, isCalendarEnabled } from './functions'; import { _getCalendarIntegration, isCalendarEnabled } from './functions';
import logger from './logger';
export * from './actions.any'; export * from './actions.any';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Sets the initial state of calendar integration by loading third party APIs * Sets the initial state of calendar integration by loading third party APIs
* and filling out any data that needs to be fetched. * and filling out any data that needs to be fetched.

View File

@ -10,11 +10,10 @@ import { getShareInfoText } from '../invite';
import { setCalendarAuthorization } from './actions'; import { setCalendarAuthorization } from './actions';
import { FETCH_END_DAYS, FETCH_START_DAYS } from './constants'; import { FETCH_END_DAYS, FETCH_START_DAYS } from './constants';
import { _updateCalendarEntries } from './functions'; import { _updateCalendarEntries } from './functions';
import logger from './logger';
export * from './functions.any'; export * from './functions.any';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Adds a Jitsi link to a calendar entry. * Adds a Jitsi link to a calendar entry.
* *

View File

@ -18,7 +18,7 @@ import { googleCalendarApi } from './web/googleCalendar';
import { microsoftCalendarApi } from './web/microsoftCalendar'; import { microsoftCalendarApi } from './web/microsoftCalendar';
import { toState } from '../base/redux'; import { toState } from '../base/redux';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* Determines whether the calendar feature is enabled by the web. * Determines whether the calendar feature is enabled by the web.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/calendar-sync');

View File

@ -23,6 +23,7 @@ import {
} from '../../../toolbox'; } from '../../../toolbox';
import { maybeShowSuboptimalExperienceNotification } from '../../functions'; import { maybeShowSuboptimalExperienceNotification } from '../../functions';
import logger from '../../logger';
import Labels from './Labels'; import Labels from './Labels';
import { default as Notice } from './Notice'; import { default as Notice } from './Notice';
@ -31,15 +32,12 @@ import {
AbstractConference, AbstractConference,
abstractMapStateToProps abstractMapStateToProps
} from '../AbstractConference'; } from '../AbstractConference';
import type { AbstractProps } from '../AbstractConference'; import type { AbstractProps } from '../AbstractConference';
declare var APP: Object; declare var APP: Object;
declare var config: Object; declare var config: Object;
declare var interfaceConfig: Object; declare var interfaceConfig: Object;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* DOM events for when full screen mode has changed. Different browsers need * DOM events for when full screen mode has changed. Different browsers need
* different vendor prefixes. * different vendor prefixes.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/conference');

View File

@ -1,5 +1,5 @@
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from './logger';
/** /**
* Begins a request to get available DesktopCapturerSources. * Begins a request to get available DesktopCapturerSources.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/desktop-picker');

View File

@ -16,8 +16,7 @@ import { updateSettings } from '../base/settings';
import { SET_DEVICE_SELECTION_POPUP_DATA } from './actionTypes'; import { SET_DEVICE_SELECTION_POPUP_DATA } from './actionTypes';
import { getDeviceSelectionDialogProps, processExternalDeviceRequest } from './functions'; import { getDeviceSelectionDialogProps, processExternalDeviceRequest } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Opens a popup window with the device selection dialog in it. * Opens a popup window with the device selection dialog in it.

View File

@ -7,13 +7,13 @@ import type { Props as AbstractDialogTabProps } from '../../base/dialog';
import { translate } from '../../base/i18n'; import { translate } from '../../base/i18n';
import JitsiMeetJS, { createLocalTrack } from '../../base/lib-jitsi-meet'; import JitsiMeetJS, { createLocalTrack } from '../../base/lib-jitsi-meet';
import logger from '../logger';
import AudioInputPreview from './AudioInputPreview'; import AudioInputPreview from './AudioInputPreview';
import AudioOutputPreview from './AudioOutputPreview'; import AudioOutputPreview from './AudioOutputPreview';
import DeviceSelector from './DeviceSelector'; import DeviceSelector from './DeviceSelector';
import VideoInputPreview from './VideoInputPreview'; import VideoInputPreview from './VideoInputPreview';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of the React {@code Component} props of {@link DeviceSelection}. * The type of the React {@code Component} props of {@link DeviceSelection}.
*/ */

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/device-selection');

View File

@ -2,8 +2,7 @@
export * from './functions'; export * from './functions';
import { getDisplayName, getSpaceUsage } from './functions'; import { getDisplayName, getSpaceUsage } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Information related to the user's dropbox account. * Information related to the user's dropbox account.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/dropbox');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/follow-me');

View File

@ -16,8 +16,7 @@ import { setFilmstripVisible } from '../filmstrip';
import { setTileView } from '../video-layout'; import { setTileView } from '../video-layout';
import { FOLLOW_ME_COMMAND } from './constants'; import { FOLLOW_ME_COMMAND } from './constants';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var APP: Object; declare var APP: Object;

View File

@ -21,8 +21,7 @@ import {
getDialInNumbers, getDialInNumbers,
invitePeopleAndChatRooms invitePeopleAndChatRooms
} from './functions'; } from './functions';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Creates a (redux) action to signal that a click/tap has been performed on * Creates a (redux) action to signal that a click/tap has been performed on

View File

@ -16,7 +16,7 @@ import {
showNotification showNotification
} from '../../../notifications'; } from '../../../notifications';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from '../../logger';
export type Props = { export type Props = {

View File

@ -18,11 +18,10 @@ import {
_getDefaultPhoneNumber, _getDefaultPhoneNumber,
getDialInfoPageURL getDialInfoPageURL
} from '../../../functions'; } from '../../../functions';
import logger from '../../../logger';
import DialInNumber from './DialInNumber'; import DialInNumber from './DialInNumber';
import PasswordForm from './PasswordForm'; import PasswordForm from './PasswordForm';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of the React {@code Component} props of {@link InfoDialog}. * The type of the React {@code Component} props of {@link InfoDialog}.
*/ */

View File

@ -4,11 +4,11 @@ import { i18next } from '../base/i18n';
import { isLocalParticipantModerator } from '../base/participants'; import { isLocalParticipantModerator } from '../base/participants';
import { doGetJSON, parseURIString } from '../base/util'; import { doGetJSON, parseURIString } from '../base/util';
import logger from './logger';
declare var $: Function; declare var $: Function;
declare var interfaceConfig: Object; declare var interfaceConfig: Object;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Sends an ajax request to check if the phone number can be called. * Sends an ajax request to check if the phone number can be called.
* *

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/invite');

View File

@ -45,10 +45,9 @@ import {
OUTGOING_CALL_RINGING_SOUND_ID, OUTGOING_CALL_RINGING_SOUND_ID,
OUTGOING_CALL_START_SOUND_ID OUTGOING_CALL_START_SOUND_ID
} from './constants'; } from './constants';
import logger from './logger';
import { sounds } from './sounds'; import { sounds } from './sounds';
const logger = require('jitsi-meet-logger').getLogger(__filename);
declare var interfaceConfig: Object; declare var interfaceConfig: Object;
/** /**

View File

@ -11,8 +11,7 @@ import {
UPDATE_DIAL_IN_NUMBERS_FAILED, UPDATE_DIAL_IN_NUMBERS_FAILED,
UPDATE_DIAL_IN_NUMBERS_SUCCESS UPDATE_DIAL_IN_NUMBERS_SUCCESS
} from './actionTypes'; } from './actionTypes';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
const DEFAULT_STATE = { const DEFAULT_STATE = {
/** /**

View File

@ -2,6 +2,7 @@
import { i18next } from '../../base/i18n'; import { i18next } from '../../base/i18n';
import logger from '../logger';
import { import {
FlacAdapter, FlacAdapter,
OggAdapter, OggAdapter,
@ -10,8 +11,6 @@ import {
} from '../recording'; } from '../recording';
import { sessionManager } from '../session'; import { sessionManager } from '../session';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* XMPP command for signaling the start of local recording to all clients. * XMPP command for signaling the start of local recording to all clients.
* Should be sent by the moderator only. * Should be sent by the moderator only.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/local-recording');

View File

@ -1,7 +1,6 @@
import logger from '../logger';
import { RecordingAdapter } from './RecordingAdapter'; import { RecordingAdapter } from './RecordingAdapter';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Base class for {@code AudioContext}-based recording adapters. * Base class for {@code AudioContext}-based recording adapters.
*/ */

View File

@ -1,7 +1,6 @@
import logger from '../logger';
import { RecordingAdapter } from './RecordingAdapter'; import { RecordingAdapter } from './RecordingAdapter';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Recording adapter that uses {@code MediaRecorder} (default browser encoding * Recording adapter that uses {@code MediaRecorder} (default browser encoding
* with Opus codec). * with Opus codec).

View File

@ -1,7 +1,6 @@
import logger from '../logger';
import { AbstractAudioContextAdapter } from './AbstractAudioContextAdapter'; import { AbstractAudioContextAdapter } from './AbstractAudioContextAdapter';
const logger = require('jitsi-meet-logger').getLogger(__filename);
const WAV_BITS_PER_SAMPLE = 16; const WAV_BITS_PER_SAMPLE = 16;
/** /**

View File

@ -1,3 +1,4 @@
import logger from '../../logger';
import { import {
DEBUG, DEBUG,
MAIN_THREAD_FINISH, MAIN_THREAD_FINISH,
@ -9,8 +10,6 @@ import {
import { AbstractAudioContextAdapter } from '../AbstractAudioContextAdapter'; import { AbstractAudioContextAdapter } from '../AbstractAudioContextAdapter';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Recording adapter that uses libflac.js in the background. * Recording adapter that uses libflac.js in the background.
*/ */

View File

@ -1,3 +1,4 @@
import logger from '../../logger';
import { import {
MAIN_THREAD_FINISH, MAIN_THREAD_FINISH,
MAIN_THREAD_INIT, MAIN_THREAD_INIT,
@ -6,8 +7,6 @@ import {
WORKER_LIBFLAC_READY WORKER_LIBFLAC_READY
} from './messageTypes'; } from './messageTypes';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* WebWorker that does FLAC encoding using libflac.js * WebWorker that does FLAC encoding using libflac.js
*/ */

View File

@ -2,7 +2,7 @@
import jitsiLocalStorage from '../../../../modules/util/JitsiLocalStorage'; import jitsiLocalStorage from '../../../../modules/util/JitsiLocalStorage';
const logger = require('jitsi-meet-logger').getLogger(__filename); import logger from '../logger';
/** /**
* Gets high precision system time. * Gets high precision system time.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../../base/logging/functions';
export default getLogger('features/mobile/audio-mode');

View File

@ -13,10 +13,10 @@ import {
import { MiddlewareRegistry } from '../../base/redux'; import { MiddlewareRegistry } from '../../base/redux';
import { _SET_AUDIOMODE_DEVICES, _SET_AUDIOMODE_SUBSCRIPTIONS } from './actionTypes'; import { _SET_AUDIOMODE_DEVICES, _SET_AUDIOMODE_SUBSCRIPTIONS } from './actionTypes';
import logger from './logger';
const { AudioMode } = NativeModules; const { AudioMode } = NativeModules;
const AudioModeEmitter = new NativeEventEmitter(AudioMode); const AudioModeEmitter = new NativeEventEmitter(AudioMode);
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Middleware that captures conference actions and sets the correct audio mode * Middleware that captures conference actions and sets the correct audio mode

View File

@ -7,8 +7,7 @@ import { PIP_ENABLED, getFeatureFlag } from '../../base/flags';
import { Platform } from '../../base/react'; import { Platform } from '../../base/react';
import { ENTER_PICTURE_IN_PICTURE } from './actionTypes'; import { ENTER_PICTURE_IN_PICTURE } from './actionTypes';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* Enters (or rather initiates entering) picture-in-picture. * Enters (or rather initiates entering) picture-in-picture.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../../base/logging/functions';
export default getLogger('features/mobile/pip');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../../base/logging/functions';
export default getLogger('features/mobile/watchos');

View File

@ -17,8 +17,7 @@ import {
import { setConferenceTimestamp, setSessionId, setWatchReachable } from './actions'; import { setConferenceTimestamp, setSessionId, setWatchReachable } from './actions';
import { CMD_HANG_UP, CMD_JOIN_CONFERENCE, CMD_SET_MUTED, MAX_RECENT_URLS } from './constants'; import { CMD_HANG_UP, CMD_JOIN_CONFERENCE, CMD_SET_MUTED, MAX_RECENT_URLS } from './constants';
import logger from './logger';
const logger = require('jitsi-meet-logger').getLogger(__filename);
const watchOSEnabled = Platform.OS === 'ios'; const watchOSEnabled = Platform.OS === 'ios';

View File

@ -14,12 +14,11 @@ import {
isFatalJitsiConnectionError isFatalJitsiConnectionError
} from '../../base/lib-jitsi-meet'; } from '../../base/lib-jitsi-meet';
import logger from '../logger';
import ReloadButton from './web/ReloadButton'; import ReloadButton from './web/ReloadButton';
declare var APP: Object; declare var APP: Object;
const logger = require('jitsi-meet-logger').getLogger(__filename);
/** /**
* The type of the React {@code Component} props of * The type of the React {@code Component} props of
* {@link AbstractPageReloadOverlay}. * {@link AbstractPageReloadOverlay}.

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/overlay');

View File

@ -0,0 +1,5 @@
// @flow
import { getLogger } from '../base/logging/functions';
export default getLogger('features/recent-list');

Some files were not shown because too many files have changed in this diff Show More