tkobayas commented on code in PR #6024:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6024#discussion_r1675628181


##########
drools-base/src/main/java/org/drools/base/rule/EvalCondition.java:
##########
@@ -223,4 +230,36 @@ public void setCloned(List<EvalCondition> cloned) {
     public String toString() {
         return this.expression.toString();
     }
+
+    public static void logWarnIfImproperEval(EvalCondition evalCondition, 
String evalExpression) {
+        if (warnLogCounter == 10) {
+            warnLogCounter++;
+            LOG.warn("More eval warnings will be suppressed...");
+            return;
+        } else if (warnLogCounter > 10) {
+            return; // avoid flooding the logs
+        }

Review Comment:
   Log a maximum of 10 warnings, because I guess if a user likes to use eval, 
there would be tons of warnings. 10 logs would be enough to get attention.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to