-
Notifications
You must be signed in to change notification settings - Fork 15
docs: Add log redirection guide #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new guide on redirecting logs from other Actor runs, showcasing both calling new runs and attaching to existing ones.
- Introduces two Python code examples for log redirection: one for
Actor.call
and one for streaming logs from an existing run. - Updates the main logging concept page to import and display these new examples.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/03_concepts/code/10_redirect_log.py | New example showing default, disabled, and custom log redirection when calling another Actor. |
docs/03_concepts/code/10_redirect_log_existing_run.py | New example demonstrating redirecting logs from an already running Actor, with context and manual control. |
docs/03_concepts/10_logging.mdx | Added a section on log redirection and imported the two new code samples into the docs. |
Comments suppressed due to low confidence (3)
docs/03_concepts/code/10_redirect_log_existing_run.py:17
- [nitpick] The placeholder actor ID 'some_id' differs from 'some_actor_id' used earlier; consider using a consistent placeholder for clarity.
streamed_log = await Actor.apify_client.run('some_id').get_streamed_log(
docs/03_concepts/code/10_redirect_log_existing_run.py:24
- [nitpick] Add an entrypoint guard (e.g.,
if __name__ == '__main__': asyncio.run(main())
) so that the example is self-contained and directly runnable.
await streamed_log.stop()
docs/03_concepts/code/10_redirect_log.py:15
- [nitpick] Consider adding
if __name__ == '__main__': asyncio.run(main())
at the end to make this snippet executable out of the box.
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use webp
for images please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Add log redirection guide
Issues