Commit 3d32f695 authored by JC Brand's avatar JC Brand

`console.trace` is only shown when showing VERBOSEly

So use `console.error` instead, which is shown when the console settings
is set to something less verbose.
parent 4dc5e01d
......@@ -163,21 +163,13 @@
'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
}, console);
if (level === Strophe.LogLevel.ERROR) {
if (_converse.debug) {
logger.trace(`${prefix} ${moment().format()} ERROR: ${message}`, style);
} else {
logger.error(`${prefix} ERROR: ${message}`, style);
}
} else if (level === Strophe.LogLevel.WARN) {
if (_converse.debug) {
logger.warn(`${prefix} ${moment().format()} WARNING: ${message}`, style);
}
} else if (level === Strophe.LogLevel.FATAL) {
if (_converse.debug) {
logger.trace(`${prefix} ${moment().format()} FATAL: ${message}`, style);
} else {
logger.error(`${prefix} FATAL: ${message}`, style);
}
} else if (_converse.debug) {
if (level === Strophe.LogLevel.DEBUG) {
logger.debug(`${prefix} ${moment().format()} DEBUG: ${message}`, style);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment