It’s possible everyone (except me) has always known this, but I’ve just discovered how to put the output of whatever script I call into the openhab logs.
val String result=executeCommandLine("myscript.sh",3000)
logInfo("EMAIL", "Command line result: {}",result)
I had always thought this would just show the exit value of the script - but it doesn’t… it takes everything that would go to stdin (if I ran myscript.sh directly) and copies it into openhab.log. Fantastic for debugging.