Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
e786af725d
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
- Don't require `auto_login` to be `true` when using the API to log in.
|
- Don't require `auto_login` to be `true` when using the API to log in.
|
||||||
|
- Moment locale wasn't being set to the value passed via the `i18n` option.
|
||||||
|
|
||||||
### New Features
|
### New Features
|
||||||
- #828 Add routing for the `#converse-login` and `#converse-register` URL
|
- #828 Add routing for the `#converse-login` and `#converse-register` URL
|
||||||
|
@ -155,27 +155,35 @@
|
|||||||
}, console);
|
}, console);
|
||||||
if (level === Strophe.LogLevel.ERROR) {
|
if (level === Strophe.LogLevel.ERROR) {
|
||||||
if (_converse.debug) {
|
if (_converse.debug) {
|
||||||
logger.trace(`ERROR: ${message}`);
|
logger.trace(`${moment().format()} ERROR: ${message}`);
|
||||||
} else {
|
} else {
|
||||||
logger.error(`ERROR: ${message}`);
|
logger.error(`ERROR: ${message}`);
|
||||||
}
|
}
|
||||||
} else if (level === Strophe.LogLevel.WARN) {
|
} else if (level === Strophe.LogLevel.WARN) {
|
||||||
|
if (_converse.debug) {
|
||||||
|
logger.warn(`${moment().format()} WARNING: ${message}`);
|
||||||
|
} else {
|
||||||
logger.warn(`WARNING: ${message}`);
|
logger.warn(`WARNING: ${message}`);
|
||||||
|
}
|
||||||
} else if (level === Strophe.LogLevel.FATAL) {
|
} else if (level === Strophe.LogLevel.FATAL) {
|
||||||
if (_converse.debug) {
|
if (_converse.debug) {
|
||||||
logger.trace(`FATAL: ${message}`);
|
logger.trace(`${moment().format()} FATAL: ${message}`);
|
||||||
} else {
|
} else {
|
||||||
logger.error(`FATAL: ${message}`);
|
logger.error(`FATAL: ${message}`);
|
||||||
}
|
}
|
||||||
} else if (_converse.debug) {
|
} else if (_converse.debug) {
|
||||||
if (level === Strophe.LogLevel.DEBUG) {
|
if (level === Strophe.LogLevel.DEBUG) {
|
||||||
logger.debug(`DEBUG: ${message}`);
|
logger.debug(`${moment().format()} DEBUG: ${message}`);
|
||||||
} else {
|
} else {
|
||||||
logger.info(`INFO: ${message}`);
|
logger.info(`${moment().format()} INFO: ${message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Strophe.log = function (level, msg) { _converse.log(level+' '+msg, level); };
|
||||||
|
Strophe.error = function (msg) { _converse.log(msg, Strophe.LogLevel.ERROR); };
|
||||||
|
|
||||||
|
|
||||||
_converse.__ = function (str) {
|
_converse.__ = function (str) {
|
||||||
/* Translate the given string based on the current locale.
|
/* Translate the given string based on the current locale.
|
||||||
*
|
*
|
||||||
@ -250,10 +258,6 @@
|
|||||||
unloadevent = 'unload';
|
unloadevent = 'unload';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Logging
|
|
||||||
Strophe.log = function (level, msg) { _converse.log(level+' '+msg, level); };
|
|
||||||
Strophe.error = function (msg) { _converse.log(msg, Strophe.LogLevel.ERROR); };
|
|
||||||
|
|
||||||
// Instance level constants
|
// Instance level constants
|
||||||
this.TIMEOUTS = { // Set as module attr so that we can override in tests.
|
this.TIMEOUTS = { // Set as module attr so that we can override in tests.
|
||||||
'PAUSED': 10000,
|
'PAUSED': 10000,
|
||||||
|
Loading…
Reference in New Issue
Block a user