They are mostly transferred to Master by TCP.
For example, when a step starts, like a shell task, will do like this
- call your shell content
# your script will be transform into a script file
script.sh > jenkins-log.txt
# running...
# after running
echo $? > jenkins-result.txt
- during the running progress, data will be transport by TCP(pull or push)
jenkins-log.txt -> Filestream -> RemoteStream -> Master
and in master, you will see single log like it
jobs/xxx/branch/master/<id>/log
- When job is done, master will send the command to clean the temp dir in the agent, so you can't see anything about logs.
One more thing, in our company, we are facing the problem of too much logs are being sent to Master like a DDOS, so a simple way to solve is to add a pipeline after the shell
limit by tail
xxx | tail -c 512k
or limit the size by head command
xxx | (head -n 1000;dd status=none of=/dev/null)