From 3787b6f1c7ba293e9acb09545535bb5fffefb974 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 26 Nov 2019 09:07:23 +0000 Subject: [PATCH] s/console/logger/ as per review --- src/crypto/OlmDevice.js | 6 +++--- src/crypto/index.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crypto/OlmDevice.js b/src/crypto/OlmDevice.js index abe0bc90b..b86b4f858 100644 --- a/src/crypto/OlmDevice.js +++ b/src/crypto/OlmDevice.js @@ -595,7 +595,7 @@ OlmDevice.prototype.encryptMessage = async function( (txn) => { this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => { const sessionDesc = sessionInfo.session.describe(); - console.log( + logger.log( "encryptMessage: Olm Session ID " + sessionId + " to " + theirDeviceIdentityKey + ": " + sessionDesc, ); @@ -627,7 +627,7 @@ OlmDevice.prototype.decryptMessage = async function( (txn) => { this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => { const sessionDesc = sessionInfo.session.describe(); - console.log( + logger.log( "decryptMessage: Olm Session ID " + sessionId + " from " + theirDeviceIdentityKey + ": " + sessionDesc, ); @@ -740,7 +740,7 @@ OlmDevice.prototype.createOutboundGroupSession = function() { OlmDevice.prototype.encryptGroupMessage = function(sessionId, payloadString) { const self = this; - console.log(`encrypting msg with megolm session ${sessionId}`); + logger.log(`encrypting msg with megolm session ${sessionId}`); checkPayloadLength(payloadString); diff --git a/src/crypto/index.js b/src/crypto/index.js index 4f29d15af..f53d1fcce 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -1638,7 +1638,7 @@ Crypto.prototype.setRoomEncryption = async function(roomId, config, inhibitDevic // It would otherwise just throw later as an unknown algorithm would, but we may // as well catch this here if (!config.algorithm) { - console.log("Ignoring setRoomEncryption with no algorithm"); + logger.log("Ignoring setRoomEncryption with no algorithm"); return; } @@ -2296,7 +2296,7 @@ Crypto.prototype._getTrackedE2eRooms = function() { Crypto.prototype._onToDeviceEvent = function(event) { try { - console.log(`received to_device ${event.getType()} from: ` + + logger.log(`received to_device ${event.getType()} from: ` + `${event.getSender()} id: ${event.getId()}`); if (event.getType() == "m.room_key"