1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

s/console/logger/ as per review

This commit is contained in:
Matthew Hodgson
2019-11-26 09:07:23 +00:00
parent 6e08835496
commit 3787b6f1c7
2 changed files with 5 additions and 5 deletions

View File

@@ -595,7 +595,7 @@ OlmDevice.prototype.encryptMessage = async function(
(txn) => { (txn) => {
this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => { this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => {
const sessionDesc = sessionInfo.session.describe(); const sessionDesc = sessionInfo.session.describe();
console.log( logger.log(
"encryptMessage: Olm Session ID " + sessionId + " to " + "encryptMessage: Olm Session ID " + sessionId + " to " +
theirDeviceIdentityKey + ": " + sessionDesc, theirDeviceIdentityKey + ": " + sessionDesc,
); );
@@ -627,7 +627,7 @@ OlmDevice.prototype.decryptMessage = async function(
(txn) => { (txn) => {
this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => { this._getSession(theirDeviceIdentityKey, sessionId, txn, (sessionInfo) => {
const sessionDesc = sessionInfo.session.describe(); const sessionDesc = sessionInfo.session.describe();
console.log( logger.log(
"decryptMessage: Olm Session ID " + sessionId + " from " + "decryptMessage: Olm Session ID " + sessionId + " from " +
theirDeviceIdentityKey + ": " + sessionDesc, theirDeviceIdentityKey + ": " + sessionDesc,
); );
@@ -740,7 +740,7 @@ OlmDevice.prototype.createOutboundGroupSession = function() {
OlmDevice.prototype.encryptGroupMessage = function(sessionId, payloadString) { OlmDevice.prototype.encryptGroupMessage = function(sessionId, payloadString) {
const self = this; const self = this;
console.log(`encrypting msg with megolm session ${sessionId}`); logger.log(`encrypting msg with megolm session ${sessionId}`);
checkPayloadLength(payloadString); checkPayloadLength(payloadString);

View File

@@ -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 // It would otherwise just throw later as an unknown algorithm would, but we may
// as well catch this here // as well catch this here
if (!config.algorithm) { if (!config.algorithm) {
console.log("Ignoring setRoomEncryption with no algorithm"); logger.log("Ignoring setRoomEncryption with no algorithm");
return; return;
} }
@@ -2296,7 +2296,7 @@ Crypto.prototype._getTrackedE2eRooms = function() {
Crypto.prototype._onToDeviceEvent = function(event) { Crypto.prototype._onToDeviceEvent = function(event) {
try { try {
console.log(`received to_device ${event.getType()} from: ` + logger.log(`received to_device ${event.getType()} from: ` +
`${event.getSender()} id: ${event.getId()}`); `${event.getSender()} id: ${event.getId()}`);
if (event.getType() == "m.room_key" if (event.getType() == "m.room_key"