1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Console logging to loglevel

This commit is contained in:
jkasun
2019-05-19 09:29:40 +05:30
parent 56062e8e4e
commit a73dabcb67
41 changed files with 248 additions and 214 deletions

View File

@@ -23,6 +23,7 @@ limitations under the License.
*/
import Promise from 'bluebird';
import logger from '../../../src/logger';
const logger = require("../../logger");
const utils = require("../../utils");
@@ -278,7 +279,7 @@ MegolmEncryption.prototype._prepareNewSession = async function() {
).catch((e) => {
// This throws if the upload failed, but this is fine
// since it will have written it to the db and will retry.
console.log("Failed to back up group session", e);
logger.log("Failed to back up group session", e);
});
}
@@ -955,7 +956,7 @@ MegolmDecryption.prototype.onRoomKeyEvent = function(event) {
).catch((e) => {
// This throws if the upload failed, but this is fine
// since it will have written it to the db and will retry.
console.log("Failed to back up group session", e);
logger.log("Failed to back up group session", e);
});
}
}).catch((e) => {
@@ -1088,7 +1089,7 @@ MegolmDecryption.prototype.importRoomKey = function(session) {
).catch((e) => {
// This throws if the upload failed, but this is fine
// since it will have written it to the db and will retry.
console.log("Failed to back up group session", e);
logger.log("Failed to back up group session", e);
});
}
// have another go at decrypting events sent with this session.