I’m not deep into functions (the outer lambda) but afaik logRuleName will not be valid as it’s not a global variable.
However, you don’t need the “per timer and per room individual logger”, so simply set the logger name to a meaningful string, e.g. “roomTimer”. all log lines then will be logged through the logger org.openhab.core.model.script.roomTimer
Did you setup org.openhab.core.model.script.DUMMY to DEBUG level? per default, all loggers org.openhab.core.model.script.* are at INFO level, so no debug messages are logged.
If you are going to go through all that effort, you might consider looking at the other rules options where true libraries are possible as opposed to Rules DSL’s minimal support for functions.
use logInfo or change the logging level of “org.openhab.core.model.script.DUMMY” to DEBUG. By default loggers log at the INFO and above level, skipping DEBUG and TRACE as @Udo_Hartmann indicates.
Any of them are better than Rules DSL. JS is probably most popular but jRuby has a good following and Python 3 support is coming to OH 5.
With JS, there’s openHAB Rules Tools Announcements which includes a TimerMgr which looks like it dose much of what you are trying to do here for you. That can be installed using npm.
Thanks for the update.
I stuck with the “old” text-rules in order for my installation not to require furthe dependencies. I will investigate js a bit.
Regardless, I tested moving the inner logInfo(“Dummy”) to the outer lambda, and it works.
So I would conclude, that some info gets lost when constructing the inner lambda.
No doubt. There is a reason why I assert Rules DSL is no longer fit for purpose. It has so amny quirks and inconsistencies that far outweigh any benefits it once had now that the other rules languages have caught up.
Note that most of the rules languages are official add-ons now and they come with their helper library preinstalled. The only dependency is to install the add-on.