Skip to content

Commit

Permalink
feat(edit-appeal): added loggers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayushi Sharma committed May 22, 2024
1 parent 41e104d commit e4a8c29
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/appeal/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ func (s *Service) Patch(ctx context.Context, appeal *domain.Appeal, opts ...Crea
}
}

s.logger.Error(ctx, "modified appeal: %w", appeal)
if err := s.repo.UpdateByID(ctx, appeal); err != nil {
return fmt.Errorf("error saving appeal to db: %w", err)
}
Expand All @@ -702,6 +703,7 @@ func (s *Service) Patch(ctx context.Context, appeal *domain.Appeal, opts ...Crea
return err
}

s.logger.Error(ctx, "audit log: %w", log)
if err := s.auditLogger.Log(ctx, AuditKeyUpdateAppeal, log); err != nil {
s.logger.Error(ctx, "failed to record audit log", "error", err)
}
Expand Down

0 comments on commit e4a8c29

Please sign in to comment.