diff options
| author | mo khan <mo@mokhan.ca> | 2025-05-01 16:04:48 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-05-07 09:21:28 -0700 |
| commit | be652dd283d8c42adddedc66d6ba9210d5bdb511 (patch) | |
| tree | 78c0c86beb06d6fb30e3fb065749422aad55ffb6 /app/controllers/sparkles/init.go | |
| parent | 524bb0c49649f5ed1d4bed693274ebe041ba1dcf (diff) | |
refactor: extract helper to log errors consistently
Diffstat (limited to 'app/controllers/sparkles/init.go')
| -rw-r--r-- | app/controllers/sparkles/init.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/sparkles/init.go b/app/controllers/sparkles/init.go index 1118a09..c85a49d 100644 --- a/app/controllers/sparkles/init.go +++ b/app/controllers/sparkles/init.go @@ -3,18 +3,18 @@ package sparkles import ( "net/http" - "github.com/xlgmokha/x/pkg/log" "github.com/xlgmokha/x/pkg/mapper" "github.com/xlgmokha/x/pkg/serde" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/cfg" "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/app/domain" + "gitlab.com/gitlab-org/software-supply-chain-security/authorization/sparkled/pkg/pls" ) func init() { mapper.Register[*http.Request, *domain.Sparkle](func(r *http.Request) *domain.Sparkle { sparkle, err := serde.FromHTTP[*domain.Sparkle](r) if err != nil { - log.WithFields(r.Context(), log.Fields{"error": err}) + pls.LogError(r.Context(), err) } sparkle.Author = cfg.CurrentUser.From(r.Context()) return sparkle |
