Query about HelloWorld.js script example

I am trying to get started in jsr223 rules programming with JavaScript. I followed the installation instructions to getting the helloworld.js to work as found at: openhab-helper-libraries-master/docs/Getting%20Started/Installation.html which came with the download I got from https://github.com/openhab-scripters/openhab-helper-libraries

I’ve set the log level to DEBUG, but all that I see in the logfile is:

2020-05-25 00:19:21.000 [DEBUG] [e.automation.internal.RuleEngineImpl] - The trigger β€˜376b685d-14da-4733-b4fd-32f515516aca-HelloWorld-js’ of rule β€˜1ba8b602-8355-4b59-9a0e-5ede58b25a11’ is triggered.

Which indicates the HelloWorld.js is triggerred, but I don’t see the phrase β€œHello World!” being added to the logfile. Shouldn’t it have been added by the line
logInfo(β€œHello World!”);

Any help in resolving this would be appreciated.

In the console, what do you see with log:get?

openhab> log:get
Logger β”‚ Level
javax.jmdns β”‚ ERROR
org.apache.karaf.jaas.modules.audit β”‚ INFO
org.apache.karaf.kar.internal.KarServiceImpl β”‚ ERROR
org.apache.karaf.shell.support β”‚ OFF
org.apache.sshd β”‚ ERROR
org.eclipse.jetty.util.thread.ThreadPoolBudget β”‚ ERROR
org.eclipse.lsp4j β”‚ OFF
org.eclipse.smarthome β”‚ INFO
org.jupnp β”‚ ERROR
org.openhab β”‚ INFO
org.openhab.core.automation β”‚ DEBUG
org.ops4j.pax.url.mvn.internal.AetherBasedResolver β”‚ ERROR
org.ops4j.pax.web.pax-web-runtime β”‚ OFF
smarthome.event β”‚ INFO
smarthome.event.InboxUpdatedEvent β”‚ ERROR
smarthome.event.ItemAddedEvent β”‚ ERROR
smarthome.event.ItemRemovedEvent β”‚ ERROR
smarthome.event.ItemStateEvent β”‚ ERROR
smarthome.event.ThingAddedEvent β”‚ ERROR
smarthome.event.ThingRemovedEvent β”‚ ERROR
smarthome.event.ThingStatusInfoEvent β”‚ ERROR

That’s it then… missing step 3

Woops, that fixed it.


1 Like