Skip to content

feat: redirect run logs in TaskClient.call - #1252

Draft
Pijukatel wants to merge 1 commit into
masterfrom
claude/intelligent-cerf-xz42y2
Draft

Pijukatel wants to merge 1 commit into
masterfrom
claude/intelligent-cerf-xz42y2

Conversation

@Pijukatel

Copy link
Copy Markdown
Contributor

TaskClient.call and TaskClientAsync.call now accept the same logger argument as ActorClient.call ('default', a custom Logger, or None). While waiting for the run, they redirect its log and status messages using the same code as ActorClient.call (get_status_message_watcher + get_streamed_log).

  • The default is 'default', matching ActorClient.call, so existing task.call() callers now get run logs redirected. Pass logger=None to opt out.
  • Added sync/async unit tests for redirecting a task call to a custom logger. Existing unit tests that mock task.call() without log endpoints now pass logger=None, as the actor variants already do.
  • Mentioned TaskClient.call in docs/02_concepts/06_logging.mdx.

JS counterpart: https://github.com/apify/apify-client-js/pulls?q=head%3Aclaude%2Fintelligent-cerf-xz42y2


Generated by Claude Code

`TaskClient.call` accepts the same `logger` argument as `ActorClient.call` and redirects the run's log and status messages to it while waiting for the run to finish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAL9oK2rVWgWZKeeVVg
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.34%. Comparing base (4b9b1a4) to head (250e40d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/apify_client/_resource_clients/task.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1252      +/-   ##
==========================================
- Coverage   95.68%   91.34%   -4.34%     
==========================================
  Files          65       65              
  Lines        6770     6784      +14     
==========================================
- Hits         6478     6197     -281     
- Misses        292      587     +295     
Flag Coverage Δ
integration ?
unit 91.34% <88.23%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants