Browse Source

Remove duplication

tags/2978
Lyubo Marinov 1 year ago
parent
commit
0892e0b644
2 changed files with 12 additions and 16 deletions
  1. +11
    -4
      logging_config.js
  2. +1
    -12
      react/features/base/logging/reducer.js

+ 11
- 4
logging_config.js View File

@@ -1,7 +1,6 @@
/* eslint-disable no-unused-vars, no-var */

// Logging configuration
// XXX When making any changes to this file make sure to also update it's React
// version at ./react/features/base/logging/reducer.js !!!
var loggingConfig = {
// default log level for the app and lib-jitsi-meet
defaultLogLevel: 'trace',
@@ -11,9 +10,17 @@ var loggingConfig = {

// The following are too verbose in their logging with the
// {@link #defaultLogLevel}:
'modules/RTC/TraceablePeerConnection.js': 'info',
'modules/statistics/CallStats.js': 'info',
'modules/xmpp/strophe.util.js': 'log',
'modules/RTC/TraceablePeerConnection.js': 'info'
'modules/xmpp/strophe.util.js': 'log'
};

/* eslint-enable no-unused-vars, no-var */

// XXX Web/React server-includes logging_config.js into index.html.
// Mobile/react-native requires it in react/features/base/logging. For the
// purposes of the latter, (try to) export loggingConfig. The following
// detection of a module system is inspired by webpack.
typeof module === 'object'
&& typeof exports === 'object'
&& (module.exports = loggingConfig);

+ 1
- 12
react/features/base/logging/reducer.js View File

@@ -7,23 +7,12 @@ import { SET_LOGGING_CONFIG } from './actionTypes';
/**
* The default/initial redux state of the feature base/logging.
*
* XXX When making any changes to the DEFAULT_STATE make sure to also update
* logging_config.js file located in the root directory of this project !!!
*
* @type {{
* config: Object
* }}
*/
const DEFAULT_STATE = {
config: {
defaultLogLevel: 'trace',

// The following are too verbose in their logging with the
// {@link #defaultLogLevel}:
'modules/statistics/CallStats.js': 'info',
'modules/xmpp/strophe.util.js': 'log',
'modules/RTC/TraceablePeerConnection.js': 'info'
}
config: require('../../../../logging_config.js')
};

ReducerRegistry.register(

Loading…
Cancel
Save