View Task Logs
This document introduces how to view the execution logs of workflow tasks, including log structure, search, download, and common troubleshooting.
When a pipeline task fails or behaves abnormally, you need to check the complete log output step by step to locate specific error lines, command return codes, or environment issues.
Configuration Instructions
View Access
- Enter the target run details page (see 1.1).
- Click the target job card to expand the step timeline.
- Click a step line; the right panel displays the complete standard output and standard error for 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 timestamp and step number prefix, which helps with timeline tracking.
Log Search and Collapse
- Collapse: Long output steps are collapsed by default for key intervals. Click to expand and view full content.
- Search: Enter keywords (such as
Error,fatal,FATAL) at the top of the log panel; the system highlights matching lines. - Download: Click the "Download Logs" button at the top right 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 easier to confirm if 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 Name | Description |
|---|---|
ATOMGIT_REPOSITORY | Full name of the repository (owner/repo) |
ATOMGIT_EVENT_NAME | Type of triggering event |
ATOMGIT_REF | Triggering reference (branch/tag) |
ATOMGIT_SHA | Triggering commit SHA |
ATOMGIT_ACTOR | Triggering user |
ATOMGIT_TOKEN | Automatically generated session Token |
ATOMGIT_RUN_ID | Unique ID of the run |
ATOMGIT_RUN_NUMBER | Run number |
steps:
- name: Run sh
run: |
echo "System vars:"
echo "Repo = $ATOMGIT_REPOSITORY"
echo "SHA = $ATOMGIT_SHA"
Common Issues
Q: The log contains *** masked content, how to view the original value?
A: Log lines containing Secret values are automatically masked as ***, which is a security mechanism. You cannot view the original value in the interface. Please confirm whether the Secret is correctly configured on the project/organization Settings → Secrets page.
Q: Some step logs are empty, what could be the reason?
A: Possible reasons include: (1) the step used uses to reference an Action, and the Action has no output internally; (2) the command was redirected using > /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: Downloaded logs are UTF-8 encoded text files. If your local tool opens them with GBK encoding, there might be character encoding issues. Please switch the editor's encoding to UTF-8.