@@ -99,7 +99,7 @@ func (db *TokenStore) DeleteTokens(ctx context.Context, deletedBy string, ids ..
9999 Set ("spent_at" , time .Now ().UTC ()).
100100 Where (HasTokens ("tx_id" , "idx" , ids ... )).
101101 Format (db .ci )
102- logger .Debug (query , args )
102+ logging .Debug (logger , query , args )
103103 if _ , err := db .writeDB .ExecContext (ctx , query , args ... ); err != nil {
104104 return errors .Wrapf (err , "error setting tokens to deleted [%v]" , ids )
105105 }
@@ -145,7 +145,7 @@ func (db *TokenStore) UnspentTokensIteratorBy(ctx context.Context, walletID stri
145145 }, tokenTable )).
146146 Format (db .ci )
147147
148- logger .Debug (query , args )
148+ logging .Debug (logger , query , args )
149149 rows , err := db .readDB .QueryContext (ctx , query , args ... )
150150 if err != nil {
151151 return nil , err
@@ -169,7 +169,7 @@ func (db *TokenStore) SpendableTokensIteratorBy(ctx context.Context, walletID st
169169 }, nil )).
170170 Format (db .ci )
171171
172- logger .Debug (query , args )
172+ logging .Debug (logger , query , args )
173173 rows , err := db .readDB .QueryContext (ctx , query , args ... )
174174 if err != nil {
175175 return nil , errors .Wrapf (err , "error querying db" )
@@ -209,7 +209,7 @@ func (db *TokenStore) queryLedgerTokens(ctx context.Context, details driver.Quer
209209 Where (HasTokenDetails (details , nil )).
210210 Format (db .ci )
211211
212- logger .Debug (query , args )
212+ logging .Debug (logger , query , args )
213213
214214 rows , err := db .readDB .QueryContext (ctx , query , args ... )
215215
@@ -289,7 +289,7 @@ func (db *TokenStore) ListAuditTokens(ctx context.Context, ids ...*token.ID) ([]
289289 ).
290290 Format (db .ci )
291291
292- logger .Debug (query , args )
292+ logging .Debug (logger , query , args )
293293 rows , err := db .readDB .QueryContext (ctx , query , args ... )
294294 if err != nil {
295295 return nil , err
@@ -348,7 +348,7 @@ func (db *TokenStore) ListHistoryIssuedTokens(ctx context.Context) (*token.Issue
348348 Where (cond .Eq ("issuer" , true )).
349349 Format (db .ci )
350350
351- logger .Debug (query )
351+ logging .Debug (logger , query )
352352 rows , err := db .readDB .QueryContext (ctx , query , args ... )
353353 if err != nil {
354354 return nil , err
@@ -413,7 +413,7 @@ func (db *TokenStore) getLedgerToken(ctx context.Context, ids []*token.ID) ([][]
413413 Where (HasTokens ("tx_id" , "idx" , ids ... )).
414414 Format (db .ci )
415415
416- logger .Debug (query , args )
416+ logging .Debug (logger , query , args )
417417 rows , err := db .readDB .QueryContext (ctx , query , args ... )
418418 if err != nil {
419419 return nil , err
@@ -458,7 +458,7 @@ func (db *TokenStore) getLedgerTokenAndMeta(ctx context.Context, ids []*token.ID
458458 Where (HasTokens ("tx_id" , "idx" , ids ... )).
459459 Format (db .ci )
460460
461- logger .Debug (query , args )
461+ logging .Debug (logger , query , args )
462462 rows , err := db .readDB .QueryContext (ctx , query , args ... )
463463 if err != nil {
464464 return nil , nil , nil , err
@@ -511,7 +511,7 @@ func (db *TokenStore) GetTokens(ctx context.Context, inputs ...*token.ID) ([]*to
511511 )).
512512 Format (db .ci )
513513
514- logger .Debug (query , args )
514+ logging .Debug (logger , query , args )
515515 rows , err := db .readDB .QueryContext (ctx , query , args ... )
516516 if err != nil {
517517 return nil , err
@@ -583,7 +583,7 @@ func (db *TokenStore) QueryTokenDetails(ctx context.Context, params driver.Query
583583 Where (HasTokenDetails (params , tokenTable )).
584584 Format (db .ci )
585585
586- logger .Debug (query , args )
586+ logging .Debug (logger , query , args )
587587 rows , err := db .readDB .QueryContext (ctx , query , args ... )
588588 if err != nil {
589589 return nil , err
@@ -608,7 +608,7 @@ func (db *TokenStore) WhoDeletedTokens(ctx context.Context, inputs ...*token.ID)
608608 Where (HasTokens ("tx_id" , "idx" , inputs ... )).
609609 Format (db .ci )
610610
611- logger .Debug (query , args )
611+ logging .Debug (logger , query , args )
612612 rows , err := db .readDB .QueryContext (ctx , query , args ... )
613613 if err != nil {
614614 return nil , nil , err
@@ -767,7 +767,7 @@ func (db *TokenStore) GetCertifications(ctx context.Context, ids []*token.ID) ([
767767 Where (HasTokens ("tx_id" , "idx" , ids ... )).
768768 Format (db .ci )
769769
770- logger .Debug (query , args )
770+ logging .Debug (logger , query , args )
771771 rows , err := db .readDB .QueryContext (ctx , query , args ... )
772772 if err != nil {
773773 return nil , errors .Wrapf (err , "failed to query" )
@@ -903,7 +903,7 @@ func (db *TokenStore) unspendableTokenFormats(ctx context.Context, walletID stri
903903 }, nil )).
904904 Format (db .ci )
905905
906- logger .Debug (query , args )
906+ logging .Debug (logger , query , args )
907907 rows , err := db .readDB .QueryContext (ctx , query , args ... )
908908 if err != nil {
909909 return nil , errors .Wrapf (err , "error querying db" )
@@ -945,7 +945,7 @@ func (t *TokenTransaction) GetToken(ctx context.Context, tokenID token.ID, inclu
945945 }, tokenTable )).
946946 Format (t .ci )
947947
948- logger .Debug (query , args )
948+ logging .Debug (logger , query , args )
949949 rows , err := t .tx .QueryContext (ctx , query , args ... )
950950 if err != nil {
951951 return nil , nil , err
@@ -996,7 +996,7 @@ func (t *TokenTransaction) Delete(ctx context.Context, tokenID token.ID, deleted
996996 Where (cond .And (cond .Eq ("tx_id" , tokenID .TxId ), cond .Eq ("idx" , tokenID .Index ))).
997997 Format (t .ci )
998998
999- logger .Debug (query , args )
999+ logging .Debug (logger , query , args )
10001000 if _ , err := t .tx .ExecContext (ctx , query , args ... ); err != nil {
10011001 return errors .Wrapf (err , "error setting token to deleted [%s]" , tokenID .TxId )
10021002 }
@@ -1014,7 +1014,7 @@ func (t *TokenTransaction) StoreToken(ctx context.Context, tr driver.TokenRecord
10141014 Fields ("tx_id" , "idx" , "issuer_raw" , "owner_raw" , "owner_type" , "owner_identity" , "owner_wallet_id" , "ledger" , "ledger_type" , "ledger_metadata" , "token_type" , "quantity" , "amount" , "stored_at" , "owner" , "auditor" , "issuer" ).
10151015 Row (tr .TxID , tr .Index , tr .IssuerRaw , tr .OwnerRaw , tr .OwnerType , tr .OwnerIdentity , tr .OwnerWalletID , tr .Ledger , tr .LedgerFormat , tr .LedgerMetadata , tr .Type , tr .Quantity , tr .Amount , time .Now ().UTC (), tr .Owner , tr .Auditor , tr .Issuer ).
10161016 Format ()
1017- logger .Debug (query , args )
1017+ logging .Debug (logger , query , args )
10181018 if _ , err := t .tx .ExecContext (ctx , query , args ... ); err != nil {
10191019 logger .Errorf ("error storing token [%s] in table [%s] [%s]: [%s][%s]" , tr .TxID , t .table .Tokens , query , err , string (debug .Stack ()))
10201020 return errors .Wrapf (err , "error storing token [%s] in table [%s]" , tr .TxID , t .table .Tokens )
@@ -1033,7 +1033,7 @@ func (t *TokenTransaction) StoreToken(ctx context.Context, tr driver.TokenRecord
10331033 Fields ("tx_id" , "idx" , "wallet_id" ).
10341034 Rows (rows ).
10351035 Format ()
1036- logger .Debug (query , args )
1036+ logging .Debug (logger , query , args )
10371037
10381038 if _ , err := t .tx .ExecContext (ctx , query , args ... ); err != nil {
10391039 logger .Errorf ("error storing token ownerships [%s]: %s" , query , err )
@@ -1049,7 +1049,7 @@ func (t *TokenTransaction) SetSpendable(ctx context.Context, tokenID token.ID, s
10491049 Where (cond .And (cond .Eq ("tx_id" , tokenID .TxId ), cond .Eq ("idx" , tokenID .Index ))).
10501050 Format (t .ci )
10511051
1052- logger .Debug (query , args )
1052+ logging .Debug (logger , query , args )
10531053 if _ , err := t .tx .ExecContext (ctx , query , args ... ); err != nil {
10541054 return errors .Wrapf (err , "error setting spendable flag to [%v] for [%s]" , spendable , tokenID .TxId )
10551055 }
@@ -1062,7 +1062,7 @@ func (t *TokenTransaction) SetSpendableBySupportedTokenFormats(ctx context.Conte
10621062 Set ("spendable" , false ).
10631063 Format (t .ci )
10641064
1065- logger .Debug (query , args )
1065+ logging .Debug (logger , query , args )
10661066 if _ , err := t .tx .ExecContext (ctx , query , args ... ); err != nil {
10671067 return errors .Wrapf (err , "error setting spendable flag to false for all tokens" )
10681068 }
@@ -1073,7 +1073,7 @@ func (t *TokenTransaction) SetSpendableBySupportedTokenFormats(ctx context.Conte
10731073 Where (cond .In ("ledger_type" , formats ... )).
10741074 Format (t .ci )
10751075
1076- logger .Debug (query , args )
1076+ logging .Debug (logger , query , args )
10771077 res , err := t .tx .ExecContext (ctx , query , args ... )
10781078 if err != nil {
10791079 return errors .Wrapf (err , "error setting spendable flag to true for token types [%v]" , formats )
0 commit comments