@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
1616limitations under the License.
1717*/
1818
19- import { logger } from '../logger' ;
19+ import { getPrefixedLogger , logger } from '../logger' ;
2020import { IndexedDBCryptoStore } from './store/indexeddb-crypto-store' ;
2121import * as algorithms from './algorithms' ;
2222
@@ -545,6 +545,7 @@ OlmDevice.prototype.createOutboundSession = async function(
545545 }
546546 } ) ;
547547 } ,
548+ getPrefixedLogger ( "[createOutboundSession]" ) ,
548549 ) ;
549550 return newSessionId ;
550551} ;
@@ -605,6 +606,7 @@ OlmDevice.prototype.createInboundSession = async function(
605606 }
606607 } ) ;
607608 } ,
609+ getPrefixedLogger ( "[createInboundSession]" ) ,
608610 ) ;
609611
610612 return result ;
@@ -638,6 +640,7 @@ OlmDevice.prototype.getSessionIdsForDevice = async function(theirDeviceIdentityK
638640 } ,
639641 ) ;
640642 } ,
643+ getPrefixedLogger ( "[getSessionIdsForDevice]" ) ,
641644 ) ;
642645
643646 return sessionIds ;
@@ -727,6 +730,7 @@ OlmDevice.prototype.getSessionInfoForDevice = async function(deviceIdentityKey,
727730 }
728731 } ) ;
729732 } ,
733+ getPrefixedLogger ( "[getSessionInfoForDevice]" ) ,
730734 ) ;
731735
732736 return info ;
@@ -761,6 +765,7 @@ OlmDevice.prototype.encryptMessage = async function(
761765 this . _saveSession ( theirDeviceIdentityKey , sessionInfo , txn ) ;
762766 } ) ;
763767 } ,
768+ getPrefixedLogger ( "[encryptMessage]" ) ,
764769 ) ;
765770 return res ;
766771} ;
@@ -794,6 +799,7 @@ OlmDevice.prototype.decryptMessage = async function(
794799 this . _saveSession ( theirDeviceIdentityKey , sessionInfo , txn ) ;
795800 } ) ;
796801 } ,
802+ getPrefixedLogger ( "[decryptMessage]" ) ,
797803 ) ;
798804 return payloadString ;
799805} ;
@@ -825,6 +831,7 @@ OlmDevice.prototype.matchesSession = async function(
825831 matches = sessionInfo . session . matches_inbound ( ciphertext ) ;
826832 } ) ;
827833 } ,
834+ getPrefixedLogger ( "[matchesSession]" ) ,
828835 ) ;
829836 return matches ;
830837} ;
@@ -1095,6 +1102,7 @@ OlmDevice.prototype.addInboundGroupSession = async function(
10951102 } ,
10961103 ) ;
10971104 } ,
1105+ getPrefixedLogger ( "[addInboundGroupSession]" ) ,
10981106 ) ;
10991107} ;
11001108
@@ -1265,6 +1273,7 @@ OlmDevice.prototype.decryptGroupMessage = async function(
12651273 } ,
12661274 ) ;
12671275 } ,
1276+ getPrefixedLogger ( "[decryptGroupMessage]" ) ,
12681277 ) ;
12691278
12701279 if ( error ) {
@@ -1310,6 +1319,7 @@ OlmDevice.prototype.hasInboundSessionKeys = async function(roomId, senderKey, se
13101319 } ,
13111320 ) ;
13121321 } ,
1322+ getPrefixedLogger ( "[hasInboundSessionKeys]" ) ,
13131323 ) ;
13141324
13151325 return result ;
@@ -1369,6 +1379,7 @@ OlmDevice.prototype.getInboundGroupSessionKey = async function(
13691379 } ,
13701380 ) ;
13711381 } ,
1382+ getPrefixedLogger ( "[getInboundGroupSessionKey]" ) ,
13721383 ) ;
13731384
13741385 return result ;
0 commit comments