scrapy_cloud_ex v0.1.2 ScrapyCloudEx.Endpoints.Storage.Logs View Source
Wraps the Logs endpoint.
The logs API lets you work with logs from your crawls.
Link to this section Summary
Functions
Retrieves logs for a given job
Link to this section Types
Integer log level.
Value | Log level |
---|---|
10 | DEBUG |
20 | INFO |
30 | WARNING |
40 | ERROR |
50 | CRITICAL |
A log object.
Map with the following keys:
"message"
- the log message (String.t/0
)."level"
- the integer log level (log_level/0
)."time"
- the UNIX timestamp of the message, in milliseconds (integer/0
).
Link to this section Functions
Link to this function
get(api_key, composite_id, params \\ [], opts \\ [])
View Source
get(String.t(), String.t(), Keyword.t(), Keyword.t()) :: ScrapyCloudEx.result([log_object()])
Retrieves logs for a given job.
The composite_id
must have at least 3 sections (i.e. refer to a job).
The following parameters are supported in the params
argument:
:format
- the format to be used for returning results. Can be:json
,:xml
,:csv
,:text
, or:jl
. Defaults to:json
.:pagination
- pagination parameters.:meta
- meta parameters to show.
The opts
value is documented here.
See docs here (GET method).
Example
ScrapyCloudEx.Endpoints.Storage.Logs.get("API_KEY", "14/13/12")