Skip to content

feat: add log helpers with options, separated stdout/stderr#656

Merged
aeneasr merged 7 commits intov4from
claude/add-log-helpers-v4-HhYAI
Mar 18, 2026
Merged

feat: add log helpers with options, separated stdout/stderr#656
aeneasr merged 7 commits intov4from
claude/add-log-helpers-v4-HhYAI

Conversation

@aeneasr
Copy link
Copy Markdown
Member

@aeneasr aeneasr commented Mar 18, 2026

Change Logs() to return LogResult{StdOut, StdErr} with Combined() helper,
matching the ExecResult pattern. Add functional options: WithTail,
WithLogsSince, WithLogsUntil, WithTimestamps. This bridges the gap from
v3's LogsOptions while keeping the API simple—streaming/Follow is left
to Pool.Client() escape hatch.

https://claude.ai/code/session_01HNrzQQdiiwY44DYNZpDmqn

Change Logs() to return LogResult{StdOut, StdErr} with Combined() helper,
matching the ExecResult pattern. Add functional options: WithTail,
WithLogsSince, WithLogsUntil, WithTimestamps. This bridges the gap from
v3's LogsOptions while keeping the API simple—streaming/Follow is left
to Pool.Client() escape hatch.

https://claude.ai/code/session_01HNrzQQdiiwY44DYNZpDmqn
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 18, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ aeneasr
❌ claude
You have signed the CLA already but the status is still pending? Let us recheck it.

aeneasr and others added 6 commits March 18, 2026 13:46
Adds FollowLogs(ctx, stdout, stderr, ...LogOption) to the Resource
interface and *resource, enabling callers to tail container logs until
context cancellation or container exit — the idiomatic way to implement
readiness detection via log output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cover the new log helper API introduced in the previous two commits:
- LogResult.Combined() unit tests (value and empty)
- Logs()/FollowLogs() return ErrClientClosed when no pool
- Integration: stdout/stderr separation via Logs()
- Integration: WithTail("1") limits output to last line
- Integration: FollowLogs streams until container exits

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aeneasr aeneasr merged commit 3fa1d89 into v4 Mar 18, 2026
5 of 6 checks passed
@aeneasr aeneasr deleted the claude/add-log-helpers-v4-HhYAI branch March 18, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants