I have read this page but I don't really follow how to get the output of my custom script in the TeamCity log
This is my custom script
tarball=$(ls -t *.tar.gz | head -n1)
scp "$tarball" email@example.com:/home/teamcity/myprojecttar
ssh -f firstname.lastname@example.org "./home/teamcity/myproject/stop.sh;sleep 5;pkill -9 -f stopkeyword;rm -rf /home/teamcity/h2;cd /home/teamcity/myprojecttar;tar -xvf $tarball;sleep 5;mkdir -p $TOOLDIR;mv $TOOLDIR $TOOLDIR-$DATE;mv /home/teamcity/myprojecttar/myproject-1.0-SNAPSHOT $TOOLDIR;cd $TOOLDIR;mkdir myproject/work;nohup ./start.sh < /dev/null > std.out 2> std.err &"
Essentially, I locate th artifact, scp it to the deploy server then run some commands over ssh to stop the existing app, deploy it and start it.
This is what is in the log
[22:00:20]Step 2/2: Deploy Artifact (Command Line) (47s)
[22:00:20]in directory: /home/teamcity/BuildAgent/work/bc43dbf51d0e3224
[22:01:07]Process exited with code 0
The process failed for some reason. How do I get all of the ssh output in the TeamCity log?