跳到主要内容

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

  1. Enter the target run details page (see 1.1).
  2. Click the target job card to expand the step timeline.
  3. 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 NameDescription
ATOMGIT_REPOSITORYFull name of the repository (owner/repo)
ATOMGIT_EVENT_NAMEType of triggering event
ATOMGIT_REFTriggering reference (branch/tag)
ATOMGIT_SHATriggering commit SHA
ATOMGIT_ACTORTriggering user
ATOMGIT_TOKENAutomatically generated session Token
ATOMGIT_RUN_IDUnique ID of the run
ATOMGIT_RUN_NUMBERRun 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.