diff --git a/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs b/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs index 563ea593..51a9aece 100644 --- a/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs +++ b/src/ConfigCatClient/Evaluate/RolloutEvaluator.cs @@ -100,19 +100,13 @@ private EvaluateResult EvaluateLogic(IDictionary settings, stri // evaluate variations - if (TryEvaluateVariations(setting.RolloutPercentageItems, key, user, out result)) + if (TryEvaluateVariations(setting.RolloutPercentageItems, key, user, evaluateLog, out result)) { - evaluateLog.Log("Evaluate % option => user targeted"); evaluateLog.ReturnValue = result.Value.ToString(); evaluateLog.VariationId = result.VariationId; - result.SettingType = setting.SettingType; return result; } - else - { - evaluateLog.Log("Evaluate % option => user not targeted"); - } } else if (setting.RolloutRules.Any() || setting.RolloutPercentageItems.Any()) { @@ -139,7 +133,8 @@ private EvaluateResult EvaluateLogic(IDictionary settings, stri } } - private static bool TryEvaluateVariations(ICollection rolloutPercentageItems, string key, User user, out EvaluateResult result) + private static bool TryEvaluateVariations(ICollection rolloutPercentageItems, string key, User user, + EvaluateLogger evaluateLog, out EvaluateResult result) { result = new EvaluateResult(); @@ -160,7 +155,7 @@ private static bool TryEvaluateVariations(ICollection rol if (hashScale >= bucket) continue; result.Value = variation.Value; result.VariationId = variation.VariationId; - + evaluateLog.Log($"Evaluating % options, '{key}' evaluated to '{variation.Value}'."); return true; } }