Compare commits

...

2 Commits

Author SHA1 Message Date
paweldomas 4b62751c3a (hack - do not merge): merge console arguments into single string
Selenium WebDriver stores only the 1st argument as "msg" and the rest
of the logs is not available.

(cherry picked from commit b3db133)
2018-03-12 11:21:25 -05:00
paweldomas eb5ce780d8 fix(RN logging): sync with logging_config.js 2018-01-11 12:55:08 -06:00
3 changed files with 46 additions and 3 deletions

View File

@ -9,6 +9,42 @@
<script>
window.indexLoadedTime = window.performance.now();
var defaultConsole = console;
function argsToJSON(args) {
var msg = '';
for (var idx = 1; idx < args.length; idx += 1) {
const arg = args[idx];
if (typeof arg === 'object') {
msg += ' [obj] ';
} else {
msg += arg + ' ';
}
}
return msg;
}
console = {
log() {
defaultConsole.log.apply(defaultConsole, [argsToJSON(arguments)]);
},
info(msg) {
defaultConsole.info.apply(defaultConsole, [argsToJSON(arguments)]);
},
debug(msg) {
defaultConsole.debug.apply(defaultConsole, [argsToJSON(arguments)]);
},
warn(msg) {
defaultConsole.warn.apply(defaultConsole, [argsToJSON(arguments)]);
},
error(msg) {
defaultConsole.error.apply(defaultConsole, [argsToJSON(arguments)]);
},
trace(msg) {
defaultConsole.trace.apply(defaultConsole, [argsToJSON(arguments)]);
}
}
console.log("(TIME) index.html loaded:\t", indexLoadedTime);
// XXX the code below listeners for errors and displays an error message
// in the document body when any of the required files fails to load.

View File

@ -1,5 +1,7 @@
/* 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',
@ -7,9 +9,10 @@ var loggingConfig = {
// Option to disable LogCollector (which stores the logs on CallStats)
// disableLogCollector: true,
// Logging level adjustments for verbose modules:
'modules/xmpp/strophe.util.js': 'log',
// 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'
};

View File

@ -5,6 +5,9 @@ import { SET_LOGGING_CONFIG } from './actionTypes';
/**
* The initial state of the feature base/logging.
*
* XXX When making any changes to the INITIAL_STATE make sure to also update
* logging_config.js file located in the root directory of this project !!!
*
* @type {{
* config: Object
* }}
@ -16,7 +19,8 @@ const INITIAL_STATE = {
// The following are too verbose in their logging with the
// {@link #defaultLogLevel}:
'modules/statistics/CallStats.js': 'info',
'modules/xmpp/strophe.util.js': 'log'
'modules/xmpp/strophe.util.js': 'log',
'modules/RTC/TraceablePeerConnection.js': 'info'
}
};