Skip to content

Commit

Permalink
fix: update log line with flag keys
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Aug 7, 2024
1 parent 91027d4 commit e53a46c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/kotlin/LocalEvaluationClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import com.amplitude.experiment.util.LocalEvaluationMetricsWrapper
import com.amplitude.experiment.util.Logger
import com.amplitude.experiment.util.USER_GROUP_TYPE
import com.amplitude.experiment.util.filterDefaultVariants
import com.amplitude.experiment.util.getAllCohortIds
import com.amplitude.experiment.util.getGroupedCohortIds
import com.amplitude.experiment.util.toEvaluationContext
import com.amplitude.experiment.util.toVariants
Expand Down Expand Up @@ -122,7 +123,15 @@ class LocalEvaluationClient internal constructor(
val groupedCohortIds = flagConfigs.getGroupedCohortIds()
if (cohortStorage == null) {
if (groupedCohortIds.isNotEmpty()) {
Logger.e("Local evaluation flags target cohorts but cohort targeting is not configured.")
val flagKeys = flagConfigs.mapNotNull { flag ->
val cohortIds = flag.getAllCohortIds()
if (cohortIds.isEmpty()) {
null
} else {
flag.key
}
}
Logger.e("Local evaluation flags $flagKeys target cohorts but cohort targeting is not configured.")
}
return user
}
Expand Down

0 comments on commit e53a46c

Please sign in to comment.