-
Notifications
You must be signed in to change notification settings - Fork 38
feat: Add redirected actor logs #769
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
base: master
Are you sure you want to change the base?
Conversation
Properly populate actor id and name
TODO: Try in actor
| "url": "https://github.com/apify/apify-client-js/issues" | ||
| }, | ||
| "homepage": "https://docs.apify.com/api/client/js/", | ||
| "files": [ |
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.
Just temp for testing
|
@barjin @janbuchar can you guys please take a look at this and provide some early feedback? I'll be off tomorrow+monday, so it would have to wait a bit for me. |
|
|
||
| export interface ActorCallOptions extends Omit<ActorStartOptions, 'waitForFinish'> { | ||
| waitSecs?: number; | ||
| log?: Log | null; |
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.
The difference from Python is the name of the argument. While in Python it is called logger and can be of type Logger, here it is log and can be of type Log.
In JS tooling, the Log is a kind of Logger from Python, as it (implicitly) includes level, formatting, and handler.
Description
rawparameter.Example usage:
Actor.call - default
This will redirect logs by default. Example default redirected line:
Actor.call - custom Log
This will redirect logs using custom log and logger. Example default redirected line:
Actor.call - no log redirection
This will disable all log redirection (same as current behavior)
Actor.run - attaching to already running actor and redirecting new logs
A typical use case is redirecting logs from an Actor that runs in standby. We do not want all the logs; we only want the new logs generated from the moment of connection.
Example actor with recursive redirection:
https://console.apify.com/actors/IcfIKTIvbmujMmovj/source
Issues
.actor().call()method to set the correct timeout, show the progress in status message, and stream logs #632