Skip to content

Commit

Permalink
Don't warn when a flag is missing
Browse files Browse the repository at this point in the history
It's totally legitimate to reference a feature flag that doesn't exist,
yet, but before this change, doing so would spam our logs with warnings.
  • Loading branch information
erbridge committed Oct 18, 2024
1 parent 936d5d8 commit 55f79fc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,6 @@ func lookupDefault(context *ldcontext.Context, name string, defaultVal bool) boo
// BoolVariation and friends only return an error in the event that flags are
// not available (e.g. if LaunchDarkly is having an outage or we've
// misconfigured the client).
result, err := currentClient.BoolVariation(name, *context, defaultVal)
if err != nil {
log.Warnf("Failed to fetch value for flag '%s' (returning default %v to caller): %v", name, defaultVal, err)
}
result, _ := currentClient.BoolVariation(name, *context, defaultVal)
return result
}

0 comments on commit 55f79fc

Please sign in to comment.