buildgolang.org/x/build/cmd/fetchlogs

fetchlogs command

Fetchlogs downloads build failure logs from the Go dashboard so they can be accessed and searched from the local file system.

It organizes these logs into two directories created in the directory specified by the -dir flag (which typically defaults to ~/.cache/fetchlogs). The log/ directory contains all log files named the same way they are named by the dashboard (which happens to be the SHA-1 of their contents). The rev/ directory contains symlinks back to these logs named

rev/<ISO 8601 commit date>-<git revision>/<builder>

Fetchlogs will reuse existing log files and revision symlinks, so it only has to download logs that are new since the last time it was run.

This makes failures easily searchable with standard tools. For example, to list the revisions and builders with a particular failure, use:

grep -lR <regexp> rev | sort
Version
v0.0.0-20250421191922-3619c213cff3 (latest)
Published
Apr 21, 2025
Platform
linux/amd64
Imports
21 packages
Last checked
2 months ago

Tools for package owners.