Conditional Expressions and Explicit Logging

This afternoon I released build 329 of Kynetx Network Services (KNS). This build includes two new features for the Kynetx Rule Language (KRL): explicit logging and conditional expressions.

Explicit logging allows developers to place information in the ruleset log when a ruleset runs. For example, the following example would place a string with the value of a variable named query in the log if the rule fired:

fired {
log "query:"+query
}

Explicit logging is useful for recording information about the rule environment in the logs for later analysis.

Conditional expressions allow expressions to take on different values depending on the results of a predicate evaluation. You can use conditional expressions as part of any expression anywhere in the language. Here's a simple example: