how to read stderr with the execute command tool

Post Reply
web3dprint
Newbie
Posts: 8
Joined: Fri Feb 26, 2016 5:04 pm

how to read stderr with the execute command tool

Post by web3dprint »

Hello, I'm quite new to Switch.

I created a command line tool to prepare some files, since we don't have the scripting package I simply used Node.js as tool and passed it my script.
Image

My tool writes to the output file correctly when there are no problems, but writes to stderr when there are errors. How do I read from stderr and maybe generate some log file?
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: how to read stderr with the execute command tool

Post by gabrielp »

I don't think you can, but check messages anyway. You can fail if it finds anything in stderr but I don't think you can check the result of stderr in that configurator. I also work with Switch and Node and I can tell you, even though it is much easier to write code in Node, having the ability to drive that code from within the Switch Scripter is very helpful.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
web3dprint
Newbie
Posts: 8
Joined: Fri Feb 26, 2016 5:04 pm

Re: how to read stderr with the execute command tool

Post by web3dprint »

Thank you for your answer! I already changed my strategy, basically outputting to a different file on error (instead of stderr). Not the same but it works!

Cheers!
Post Reply