Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The syntax of an explicit logging statement is:
log <expr>
where <expr> is any valid KRL expression that results in a string (or something that can be cast as a string such as a number).
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 }
The following would only log with an empty query:
fired { log "Empty query" if(query like "^$") }
rule r3 is active {
select when http post label re#ex# status_code re#([45]\d\d)#
setting (status)
fired {
log <<Error: #{status}: #{event:attr("status_line")}>>
last;
}
}

  • No labels