Skip to content

Commit

Permalink
Merge pull request #4 from Galactica-corp/fix-issue2
Browse files Browse the repository at this point in the history
Remove personal info from logs
  • Loading branch information
lomigmegard authored Sep 24, 2024
2 parents 8517ca4 + 8936e7c commit a5b62df
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ func (h *Handlers) GenerateCert(c echo.Context) error {
})
}

log.Printf("REQUEST: %+v", req)
log.
WithField("holderCommitment", req.HolderCommitment).
WithField("userID", req.UserID).
Info("request")

if err := c.Validate(req); err != nil {
log.WithError(err).Error("validate gen cert request")
Expand Down Expand Up @@ -178,7 +181,9 @@ func (h *Handlers) GetCert(c echo.Context) error {
})
}

log.Printf("REQUEST: %+v", req)
log.
WithField("userID", req.UserID).
Info("request")

certificate, err := readCertFromDB(h.inMem, req.UserID)
if err != nil {
Expand Down

0 comments on commit a5b62df

Please sign in to comment.