You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core-api/src/main/java/com/optimizely/ab/config/audience/UserAttribute.java
+12-10Lines changed: 12 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,8 @@ public Boolean evaluate(ProjectConfig config,
85
85
ObjectuserAttributeValue = attributes.get(name);
86
86
87
87
if (!"custom_attribute".equals(type)) {
88
-
logger.warn("Audience condition \"{}\" uses an unknown condition type. You may need to upgrade to a newer release of the Optimizely SDK.", this);
88
+
Stringmessage = reasons.addInfoF("Audience condition \"%s\" uses an unknown condition type. You may need to upgrade to a newer release of the Optimizely SDK.", this);
89
+
logger.warn(message);
89
90
returnnull; // unknown type
90
91
}
91
92
// check user attribute value is equal
@@ -100,26 +101,27 @@ public Boolean evaluate(ProjectConfig config,
100
101
} catch(UnknownValueTypeExceptione) {
101
102
if (!attributes.containsKey(name)) {
102
103
//Missing attribute value
103
-
logger.debug("Audience condition \"{}\" evaluated to UNKNOWN because no value was passed for user attribute \"{}\"", this, name);
104
+
Stringmessage = reasons.addInfoF("Audience condition \"%s\" evaluated to UNKNOWN because no value was passed for user attribute \"%s\"", this, name);
105
+
logger.debug(message);
104
106
} else {
105
107
//if attribute value is not valid
106
108
if (userAttributeValue != null) {
107
-
logger.warn(
108
-
"Audience condition \"{}\" evaluated to UNKNOWN because a value of type \"{}\" was passed for user attribute \"{}\"",
109
+
Stringmessage = reasons.addInfoF("Audience condition \"%s\" evaluated to UNKNOWN because a value of type \"%s\" was passed for user attribute \"%s\"",
109
110
this,
110
111
userAttributeValue.getClass().getCanonicalName(),
111
112
name);
113
+
logger.warn(message);
112
114
} else {
113
-
logger.debug(
114
-
"Audience condition \"{}\" evaluated to UNKNOWN because a null value was passed for user attribute \"{}\"",
115
-
this,
116
-
name);
115
+
Stringmessage = reasons.addInfoF("Audience condition \"%s\" evaluated to UNKNOWN because a null value was passed for user attribute \"%s\"", this, name);
0 commit comments