I am looking for a log where the output of the task is written on the server where the agent is running.
I created a Script Task in Plan as shown below.
----------------
echo "Here I am"
exit 3
----------------
I also checked the following message in the Logs-Build log on the web.
------------------------------------------------------------------------------------------------
18-Dec-2023 22:42:51 Here i am
18-Dec-2023 22:42:51 Failing task since return code of [/hdd/bamboo-agent-home/bamboo-agent01/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MZSWC5DVOJSS6VCFON2D6TKDKVPVGRZSL5CVMP2EJFLA-BJT-2-ScriptBuildTask-6285048483259833227.sh] was 3 while expected 0
------------------------------------------------------------------------------------------------
However, there is no 'Here i am' message in the agent's bamboo-agent01/logs/atlassian-bamboo-agent.log file, as shown below.
------------------------------------------------------------------------------------------------
13848 INFO | jvm 1 | 2023/12/18 22:42:51 | 2023-12-18 22:42:51,030 INFO [0-BAM::AP::Agent:pool-5-thread-1] [ProcessServiceImpl$2] Beginning to execute external process for build ...
13849 INFO | jvm 1 | 2023/12/18 22:42:51 | 2023-12-18 22:42:51,040 INFO [0-BAM::AP::Agent:pool-5-thread-1] [TaskResultBuilder] Failing task since return code of [/hdd/bamboo-agent-home/bamboo-agent01/temp/VES-AKNBU2P2NINKV6U2HGJPUKVR7MZSWC5DVOJSS6VCFON2D6TKDKVPVGRZSL5CVMP2EJFLA-BJT-2-ScriptBuildTask -6285048483259833227.sh] was 3 while expected 0
------------------------------------------------------------------------------------------------
The only clue I found is when you timeout for a long time after the echo message. During the timeout, there was a bamboo-agent01/temp/log_spool/plan-153780472-BJT-2.log file, and that file had an echo message.
--------------------------------------
build 18-Dec-2023 22:56:56 Here I am
--------------------------------------
However, this file is created 4 to 7 seconds after the execution of the echo command is seen on the web, so it does not seem to be the file being logged by the agent.
I believe agent will have a complete log. (Or I think there is such a setting)
I'm continuing to look. Please give me some advice. Thank you.