@@ -15,7 +15,7 @@ export class AppPersistenceBridge extends PersistenceBridge {
1515 }
1616
1717 protected async create ( data : object , appId : string ) : Promise < string > {
18- this . orch . debugLog ( `The App ${ appId } is storing a new object in their persistence.` , data ) ;
18+ this . orch . debugLog ( `The App ${ appId } is storing a new object in their persistence.` ) ;
1919
2020 if ( typeof data !== 'object' ) {
2121 throw new Error ( 'Attempted to store an invalid data type, it must be an object.' ) ;
@@ -28,11 +28,10 @@ export class AppPersistenceBridge extends PersistenceBridge {
2828 }
2929
3030 protected async createWithAssociations ( data : object , associations : Array < RocketChatAssociationRecord > , appId : string ) : Promise < string > {
31- this . orch . debugLog (
32- `The App ${ appId } is storing a new object in their persistence that is associated with some models.` ,
33- data ,
31+ this . orch . debugLog ( {
32+ msg : `The App ${ appId } is storing a new object in their persistence that is associated with some models.` ,
3433 associations,
35- ) ;
34+ } ) ;
3635
3736 if ( typeof data !== 'object' ) {
3837 throw new Error ( 'Attempted to store an invalid data type, it must be an object.' ) ;
@@ -53,7 +52,7 @@ export class AppPersistenceBridge extends PersistenceBridge {
5352 }
5453
5554 protected async readByAssociations ( associations : Array < RocketChatAssociationRecord > , appId : string ) : Promise < Array < object > > {
56- this . orch . debugLog ( `The App ${ appId } is searching for records that are associated with the following:` , associations ) ;
55+ this . orch . debugLog ( { msg : `The App ${ appId } is searching for records that are associated with the following:` , associations } ) ;
5756
5857 const records = await this . orch
5958 . getPersistenceModel ( )
@@ -84,7 +83,7 @@ export class AppPersistenceBridge extends PersistenceBridge {
8483 associations : Array < RocketChatAssociationRecord > ,
8584 appId : string ,
8685 ) : Promise < Array < object > | undefined > {
87- this . orch . debugLog ( `The App ${ appId } is removing records with the following associations:` , associations ) ;
86+ this . orch . debugLog ( { msg : `The App ${ appId } is removing records with the following associations:` , associations } ) ;
8887
8988 const query = {
9089 appId,
@@ -105,7 +104,7 @@ export class AppPersistenceBridge extends PersistenceBridge {
105104 }
106105
107106 protected async update ( id : string , data : object , _upsert : boolean , appId : string ) : Promise < string > {
108- this . orch . debugLog ( `The App ${ appId } is updating the record "${ id } " to:` , data ) ;
107+ this . orch . debugLog ( `The App ${ appId } is updating the record "${ id } "` ) ;
109108
110109 if ( typeof data !== 'object' ) {
111110 throw new Error ( 'Attempted to store an invalid data type, it must be an object.' ) ;
@@ -120,7 +119,7 @@ export class AppPersistenceBridge extends PersistenceBridge {
120119 upsert = true ,
121120 appId : string ,
122121 ) : Promise < string > {
123- this . orch . debugLog ( `The App ${ appId } is updating the record with association to data as follows:` , associations , data ) ;
122+ this . orch . debugLog ( { msg : `The App ${ appId } is updating the record with association to data as follows:` , associations } ) ;
124123
125124 if ( typeof data !== 'object' ) {
126125 throw new Error ( 'Attempted to store an invalid data type, it must be an object.' ) ;
0 commit comments