How print in console from function

Hi, im trying to debug my code, I want to print something in the console everytime function calculateRoster is called. I try with print "test" / print("test"), but my output console is empty. Im sure the function is being called.

Print will always show up in the Wrapper log in the Program files of your Ignition installation folder.

Because this is a pipeline, you really should look into using a logger. Look up system.util.getLogger() and go from there. This will show up on the logs page in Ignition's web interface.

3 Likes

Best practice is to never use print in production. The only time I use it now is if I am in script console writing or debugging a specific function, but before that function goes into production, any important print statement should be converted to a logger.info/error/warn/trace type of statement.

1 Like

Thanks, that help. Would be nice to have access to the output console.

You can't print to the output console because the execution scope is different. Alarm pipelines are executing on the gateway, not the local machine (like the script console).