Log Command For jsr223 Javacript?

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?

I’m just starting up on JSR223 using Jython. But in researching, I had found this, which has some JS logging.

Thanks for the link. I’d seen that before too, but the examples that used logInfo didn’t seem to have an import that set it up as far as I could tell. I just looked a bit more deeply at it, and it looks like helper.js may set up log calls. So perhaps if I use this library and make sure to include helper.js it may work. Thanks.