LogClient
Hierarchy
- ResourceClient
- LogClient
Index
Properties
inheritedapifyClient
inheritedbaseUrl
inheritedhttpClient
optionalinheritedid
optionalinheritedparams
inheritedpublicBaseUrl
Added in 2.17.0
inheritedresourcePath
optionalinheritedsafeId
inheritedurl
Methods
get
Retrieves the log as a string.
The
bufferoption only selects the return type: the bytes come back as a Buffer (Node.js) or ArrayBuffer (browser), not decoded to a string. Either way the whole log is downloaded in one response; to read it incrementally, use LogClient.stream.Parameters
optionaloptions: LogGetOptions & { buffer?: false }
Log retrieval options.
Returns Promise<undefined | string>
The log content, or
undefinedif it does not exist. A chained client such asrun.log()throws anApifyApiErroron a 404, since the run itself may be what is missing.See more at https://docs.apify.com/api/v2/log-get
stream
Retrieves the log as a Readable stream. Only works in Node.js.
Parameters
options: LogOptions = {}
Log retrieval options.
Returns Promise<undefined | Readable>
The log content as a Readable stream, or
undefinedif it does not exist. A chained client such asrun.log()throws anApifyApiErroron a 404, since the run itself may be what is missing.See more at https://docs.apify.com/api/v2/log-get
Client for accessing Actor run or build logs.
Provides methods to retrieve logs as text or stream them in real-time. Logs can be accessed for both running and finished Actor runs and builds.