跳到主要内容

View Task Logs

Applicable Scenarios: When a pipeline task fails or behaves abnormally, you need to view the complete log output step by step to locate specific error lines, command return codes, or environment issues.

Configuration Description

View Access Point

  1. Enter the target run details page (see 1.1).
  2. Click on the target job card to expand the step timeline.
  3. Click on a step line, and the right panel displays the full standard output and standard error of that step.

Log Structure

The logs for each job are organized in step order:

── Job: compile ({ubuntu-24,x64,small})
├── Step 1: Checkout repository ← run: git checkout
├── Step 2: Set up toolchain ← uses: action-setup-toolchain
├── Step 3: Run build command ← run: make build
└── Post: Clean up workspace ← post processing

Each log line has a prefix with a timestamp and step number, making it easier to track the timeline.

Log Search and Collapse

  • Collapse: Long output steps are collapsed by default, click to expand and view the full content.
  • Search: Enter keywords (such as Error, fatal, FATAL) at the top of the log panel, and the system highlights matching lines.
  • Download: Click the "Download Log" button in the top right corner to get the complete log file for this job.

Context Variables in Logs

Logs may contain expanded results of AtomGit Action context variables, for example:

steps:
- run: echo "Repo is ${{ atomgit.repository }}"
- run: echo "Actor is ${{ atomgit.actor }}"
- run: echo "Event is ${{ atomgit.event_name }}"

The atomgit context expands to actual values in the logs, making it easy to confirm whether the trigger information is correct.

System Variables ATOMGIT_*

In addition to ${{ }} expressions, the Runner environment also injects ATOMGIT_* system environment variables, which can be directly viewed in the logs:

Variable NameDescription
ATOMGIT_REPOSITORYFull name of the repository (owner/repo)
ATOMGIT_EVENT_NAMEType of triggering event
ATOMGIT_REFTriggered reference (branch/tag)
ATOMGIT_SHATriggered commit SHA
ATOMGIT_ACTORTriggering user
ATOMGIT_TOKENAutomatically generated session Token
ATOMGIT_RUN_IDUnique ID of the run
ATOMGIT_RUN_NUMBERRun number
steps:
- run: |
echo "System vars:"
echo "Repo = $ATOMGIT_REPOSITORY"
echo "SHA = $ATOMGIT_SHA"

Common Issues

Q: The log contains *** to mask content, how to view the original value?

A: Log lines containing Secret values are automatically masked as ***, which is a security mechanism and the original value cannot be viewed in the interface. Please confirm if the Secret is correctly configured on the project/organization Settings → Secrets page.

Q: Some step logs are empty, what is the reason?

A: Possible reasons include: (1) the step uses uses to reference an Action, and the Action itself has no output; (2) the command is redirected with > /dev/null; (3) the step timed out during setup and was killed, so the logs were not fully written.

Q: The downloaded log file has encoding issues?

A: The downloaded log is a UTF-8 encoded text file. If your local tool opens it by default in GBK, it may cause garbled text. Please switch the editor's encoding to UTF-8.