add debug logs for user state change

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2025-04-30 15:21:01 +03:00
parent d5081cef90
commit 24053750d9
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -209,6 +209,10 @@ func (s *SqlStore) SaveAccount(ctx context.Context, account *types.Account) erro
if s.metrics != nil {
s.metrics.StoreMetrics().CountPersistenceDuration(took)
}
data, _ := json.MarshalIndent(account, "", " ")
log.WithContext(ctx).Debugf("saved an account Account ID: %s, state: %s Trace: %s", account.Id, data, debug.Stack())
log.WithContext(ctx).Debugf("took %d ms to persist an account to the store", took.Milliseconds())
return err