Hi, I’ve had the problem for a while that when adding print statements to various scripts throughout ignition I am not seeing the prints in the output console. I’m not sure why this is happening. Am I looking in the wrong spot for my test outputs or am I doing something else wrong. Any help appreciated. Thanks
If you’re adding scripts that will ultimately be executed in the gateway scope (tag event scripts, gateway timer scripts, tag change scripts, etc) then these statements will go into the wrapper.log file and nowhere else. If you want them to be visible in the Status -> Logs page, then use
system.util.getLogger instead of print statements.
That’s not the case. I’m just adding the scripts in to certain button functions and still not seeing anything with that
Can you provide one of these scripts? I’ve never seen a print statement that was actually executing not get output to the console.
I actually tested it with just a button that all it had in it was:
and I still got nothing printed in the console.
Could you take a screenshot of where you’re adding the script and the console you’re looking at?
What event handler do you have it added to?
I have it set to “actionPerformed”
You should get in contact with support - if you have a support contract, they can get onto your system live and take a look at what’s going on, because I’ve never seen this fail, and I have no idea what the problem might be.
I’m not sure what just changed but all of a sudden I started getting prints in the console from a different script on another button that I wasn’t getting before. If I keep seeing issues I will use our support number to dive into the problem more deeply.
I have had a similar issue except I get a buffer overflow error message. To reproduce create a tag browse tree and under the filter tag extension function put a print statement. After expanding some folders the print statements will stop. Then trying to print from an action preformed event handler on a button will give this error message
Traceback (most recent call last): File "<event:actionPerformed>", line 1, in <module> java.nio.BufferOverflowException java.nio.BufferOverflowException: java.nio.BufferOverflowException caused by BufferOverflowException Ignition v7.9.5 (b2017111615) Java: Oracle Corporation 1.8.0_101
Any updates on this issue, still appears to exist in v7.9.10?
I was playing with the Tag Browse Tree and scripting the filterTag extension and could not get any print statements to work. After that, having never tried scripting a print statement previously I decided to go simple and create a new window, with a single button, with a single line of script.
And am now met with this error anytime I press the button.
I should add that restarting designer made the issue with the scripted button go away and I was able to see the output in the output console (initially).
However after opening the window on which I had placed the Tag Browse Tree with a ‘print tag.name’ in the scripted filterTag extension. Returning to the window with the scripted button and pressing it again caused the the previous error (java.nio.BufferOverFlowException).
Update: Restarted designer and attempted to see whether I could reliably reproduce the issue each time and I cannot. Now the print statements in the scripted button and the scripted filterTag extension work without issue.
Is there any update on this topic?
I am having similar issue: my script in Tag Browse Tree (in Filter) is ignored. I simplified script and now it is just:
I am using version 7.9.10
explanation of how to use system.util.getLoggger
Verify if you are checking the console in the right scope, for exemple:
if you are testing inside designer, you can check on Tools->Console
If you are doing test on a client, Ctrl+Shift+F7 will give you the Console from the client side, which is totally logic.
This solved my problem.