Skip to content

Commit

Permalink
log missing output policy
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Aug 10, 2023
1 parent c22ab6a commit 49595c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/pkg/policy/parsed_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
"context"
"encoding/json"
"errors"
"fmt"

"github.com/rs/zerolog/log"

"github.com/elastic/fleet-server/v7/internal/pkg/bulk"
"github.com/elastic/fleet-server/v7/internal/pkg/model"
Expand Down Expand Up @@ -69,7 +70,7 @@ func NewParsedPolicy(ctx context.Context, bulker bulk.Bulk, p model.Policy) (*Pa
// Find the default role.
outputs, ok := fields[FieldOutputs]
if !ok {
fmt.Printf("Outputs not found for policy: %s", p.PolicyID)
log.Error().Str("PolicyID", p.PolicyID).Msg("Outputs not found for policy")
return nil, ErrOutputsNotFound
}

Expand Down

0 comments on commit 49595c5

Please sign in to comment.