Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello,
Has anyone discovered a way to redirect the ouput from the CLI to a log file? I would like to redirect the ID and/or any errors from the command window to a text file that can be viewed at a later time. I have tried "im createissue .... >log.txt" with no results entered in the txt file.
Thank You,
Paul
Solved! Go to Solution.
Hi Paul,
the problem is that some of the CLI commands return on STDERR while other messages come through STDOUT.
So to be shure you get all the output you would see in the shell in your log-file, you'll have to redirect both streams
e.g.
"im createissue .... >log.txt 2>&1
HTH Matthias
Hi Paul,
the problem is that some of the CLI commands return on STDERR while other messages come through STDOUT.
So to be shure you get all the output you would see in the shell in your log-file, you'll have to redirect both streams
e.g.
"im createissue .... >log.txt 2>&1
HTH Matthias
Matthias,
Thank you for the help. I am now getting an entries in the log file, but it they are comming in like the following:
牃慥楴杮倠潲牧浡删煥極敲敭瑮⸠⸮ഠ⨊⨪䌠畯摬渠瑯猠癡瑩浥›䭍ㅓ㐲㔲㨰䘠敩.....
Do you have any ideas why this would be happening?
Thank You,
Paul
Hi Paul,
Matthias is right. That's the way to Pipe your cmd output into a file.
It's described in the www when you search for "technet using command redirection operators".
I'm not sure what you've done to get this output 🙂