Logging variables used in rules with karaf

Hi I’m trying out some rules and I like to log varibles in karaf by e.g. using the logInfo(“XX”,“YY”)
If I pass a variables I get an error, is it possible to log a variable in some other way.
Thanks in advance

I discovered that I can use logInfo(“XX”,“YY” + vaiableName)