sourcegraph/dev/sg/tail
Jean-Hadrien Chabran bc4acd1fbd
feat(local): sg tail (#64146)
This PR brings back https://github.com/sourcegraph/sgtail back in `sg`,
plus a few adjustments to make it easier to use. I'll archive that repo
once this PR lands.

@camdencheek mentioned you here as you've been the most recent beta
tester, it's more an FYI than a request for a review, though it's
welcome if you want to spend a bit of time reading this.

Closes DINF-155

## Test plan

Locally tested + new unit test + CI

## Changelog

- Adds a new `sg tail` command that provides a better UI to tail and
filter log messages from `sg start --tail`.
2024-07-30 14:03:27 +02:00
..
activity_test.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
activity.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
BUILD.bazel feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
commands.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
help.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
model.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
README.md feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
socket.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
styles.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00
tail.go feat(local): sg tail (#64146) 2024-07-30 14:03:27 +02:00

sg tail

A small utility that connects to a running sg start --tail and provides a better UI to read logs.

Usage

In your usual terminal session:

sg tail

In another terminal session:

cd sourcegraph
sg start --tail

CLI

Flags:

  • --only-name [name]: starts sg tail with a new tab focused, that only displays logs from service whose name starts with [name].

Keybindings

Press h or ? when sg tail is running to see the inline help.