I’m trying to figure out how to write information to the log in jsr223 using javascript. I’ve got a very simple script changing an item state, but the print() function in some of the examples isn’t working.
Searching the forums, I found a python example importing the logger with this line
from org.slf4j import LoggerFactory
and then calling the log with this line
LoggerFactory.getLogger("org.eclipse.smarthome.automation.examples").info(mystring)
I haven’t tried this code, but this is exactly what I want to do, just in javascript instead of python. Can anybody help?