Skip to content
Snippets Groups Projects
Commit 82815720 authored by Yordan Kinkov's avatar Yordan Kinkov
Browse files

Add policy repository to log messages

parent 845235de
No related branches found
No related tags found
1 merge request!47Add URL evaluation path parameter for different GIT repositories
Pipeline #67153 passed with stages
in 3 minutes and 8 seconds
......@@ -72,6 +72,7 @@ loop:
func (e *Refresher) Execute(ctx context.Context, p *storage.Policy) {
logger := e.logger.With(
zap.String("policyRepository", p.Repository),
zap.String("policyName", p.Name),
zap.String("policyGroup", p.Group),
zap.String("policyVersion", p.Version),
......
......@@ -70,6 +70,7 @@ func (s *Service) Evaluate(ctx context.Context, req *policy.EvaluateRequest) (*p
}
logger := s.logger.With(
zap.String("repository", req.Repository),
zap.String("group", req.Group),
zap.String("name", req.PolicyName),
zap.String("version", req.Version),
......@@ -142,6 +143,7 @@ func (s *Service) Evaluate(ctx context.Context, req *policy.EvaluateRequest) (*p
// Lock a policy so that it cannot be evaluated.
func (s *Service) Lock(ctx context.Context, req *policy.LockRequest) error {
logger := s.logger.With(
zap.String("repository", req.Repository),
zap.String("group", req.Group),
zap.String("name", req.PolicyName),
zap.String("version", req.Version),
......@@ -173,6 +175,7 @@ func (s *Service) Lock(ctx context.Context, req *policy.LockRequest) error {
// Unlock a policy so it can be evaluated again.
func (s *Service) Unlock(ctx context.Context, req *policy.UnlockRequest) error {
logger := s.logger.With(
zap.String("repository", req.Repository),
zap.String("group", req.Group),
zap.String("name", req.PolicyName),
zap.String("version", req.Version),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment