Beginner question regarding rules


i am starting with scripts and rules. Wanted to start with some basic things like logging something every minute into a log file. Here is my rule called test.rules

rule "Test"


    Time is cron "0 0/1 * 1/1 * ? *"


    logInfo("test.rules", "This is a log entry of type Info!")


I am wondering in which file that is being logged. Well i found the logging documentation but to be honest i am a bit confused if i have to add something to the logging.cfg or not. In my /var/log/openhab2 folder i only have the aduit, events and the openhab log files.

So what am i missing?

you should write like this (remove the β€œis”):

Time cron "0 * * * * ?"

and then your log-text should be written to openhab.log. if you are working with openhabian then frontail should be installed automatically, then type in browser


and you can follow the log there :wink:

Thanks works now.

Sorry for the dumb question.

Here there are no dumb questions. Welcome.

The only dumb ones here are those who refuse to even try the advice given.

1 Like

you are very welcome jochen!
i am happy if i can help at least a little. i like this forum so much because it helped me very often to find solutions for my problems.
best, stefan

1 Like