Skip to content

Commit f80ebcc

Browse files
committed
Redesign logs command with dump and follow modes
- gob logs [job_id]: dump stdout→stdout, stderr→stderr - gob logs -f [job_id]: follow with prefixed output (previous behavior) - Optional job_id arg scopes to a single job - Dump mode preserves stream separation for downstream processing
1 parent 166a799 commit f80ebcc

File tree

4 files changed

+354
-144
lines changed

4 files changed

+354
-144
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- **`logs` command redesigned**: Now supports both dump and follow modes with optional job ID
13+
- `gob logs` — dump stdout and stderr for all jobs in current directory
14+
- `gob logs <job_id>` — dump stdout and stderr for a specific job
15+
- `gob logs -f` — follow all jobs in current directory (previous default behavior)
16+
- `gob logs -f <job_id>` — follow both streams for a specific job
17+
- Dump mode preserves stream separation: stdout content goes to stdout, stderr content goes to stderr
18+
- Follow mode uses prefixed output (unchanged from before)
19+
1020
## [3.2.1] - 2026-02-12
1121

1222
### Fixed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ gob await abc
143143
# List all jobs
144144
gob list
145145

146-
# View stdout output
147-
gob stdout abc
146+
# View stdout and stderr
147+
gob logs abc
148148

149149
# Stop a job
150150
gob stop abc
@@ -184,7 +184,8 @@ Do NOT use `gob` for:
184184
- `gob await <job_id>` - Wait for job to finish, stream output
185185
- `gob await-any` - Wait for whichever job finishes first
186186
- `gob list` - List jobs with IDs, status, and descriptions
187-
- `gob stdout <job_id>` - View current output (useful if job may be stuck)
187+
- `gob logs <job_id>` - View stdout and stderr (stdout→stdout, stderr→stderr)
188+
- `gob stdout <job_id>` - View current stdout (useful if job may be stuck)
188189
- `gob stop <job_id>` - Graceful stop
189190
- `gob restart <job_id>` - Stop + start
190191

@@ -193,7 +194,7 @@ Do NOT use `gob` for:
193194
`gob run` and `gob await` automatically detect potentially stuck jobs:
194195
- Timeout: avg duration + 1 min (or 5 min if no history), triggers if no output for 1 min
195196
- Job continues running in background
196-
- Use `gob stdout <id>` to check output, `gob await <id>` to continue waiting
197+
- Use `gob logs <id>` or `gob stdout <id>` to check output, `gob await <id>` to continue waiting
197198

198199
### Examples
199200

@@ -320,7 +321,7 @@ Run `gob <command> --help` for detailed usage, examples, and flags.
320321
| `stats <id>` | Show statistics for a job |
321322
| `stdout <id>` | View stdout (`--follow` for real-time) |
322323
| `stderr <id>` | View stderr (`--follow` for real-time) |
323-
| `logs` | Follow all output for current directory |
324+
| `logs [id]` | View stdout and stderr (`--follow` for real-time) |
324325
| `ports [id]` | List listening ports (`--all` for all jobs) |
325326
| `stop <id>` | Stop job (`--force` for SIGKILL) |
326327
| `start <id>` | Start stopped job |

0 commit comments

Comments
 (0)