Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FSSDK-10397] replace info log with debug log for Decision flow #390

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (o *OptimizelyClient) decide(userContext OptimizelyUserContext, key string,

if o.notificationCenter != nil {
decisionNotification := decision.FlagNotification(key, variationKey, ruleKey, flagEnabled, eventSent, usrContext, variableMap, reasonsToReport)
o.logger.Info(fmt.Sprintf(`Feature %q is enabled for user %q? %v`, key, usrContext.ID, flagEnabled))
o.logger.Debug(fmt.Sprintf(`Feature %q is enabled for user %q? %v`, key, usrContext.ID, flagEnabled))
if e := o.notificationCenter.Send(notification.Decision, *decisionNotification); e != nil {
o.logger.Warning("Problem with sending notification")
}
Expand Down Expand Up @@ -481,9 +481,9 @@ func (o *OptimizelyClient) IsFeatureEnabled(featureKey string, userContext entit
}

if result {
o.logger.Info(fmt.Sprintf(`Feature %q is enabled for user %q.`, featureKey, userContext.ID))
o.logger.Debug(fmt.Sprintf(`Feature %q is enabled for user %q.`, featureKey, userContext.ID))
} else {
o.logger.Info(fmt.Sprintf(`Feature %q is not enabled for user %q.`, featureKey, userContext.ID))
o.logger.Debug(fmt.Sprintf(`Feature %q is not enabled for user %q.`, featureKey, userContext.ID))
}

if o.notificationCenter != nil {
Expand Down Expand Up @@ -1087,9 +1087,9 @@ func (o *OptimizelyClient) getExperimentDecision(experimentKey string, userConte

if experimentDecision.Variation != nil {
result := experimentDecision.Variation.Key
o.logger.Info(fmt.Sprintf(`User %q is bucketed into variation %q of experiment %q.`, userContext.ID, result, experimentKey))
o.logger.Debug(fmt.Sprintf(`User %q is bucketed into variation %q of experiment %q.`, userContext.ID, result, experimentKey))
} else {
o.logger.Info(fmt.Sprintf(`User %q is not bucketed into any variation for experiment %q: %s.`, userContext.ID, experimentKey, experimentDecision.Reason))
o.logger.Debug(fmt.Sprintf(`User %q is not bucketed into any variation for experiment %q: %s.`, userContext.ID, experimentKey, experimentDecision.Reason))
}

return decisionContext, experimentDecision, err
Expand Down
Loading