scrapy_cloud_ex v0.1.1 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

Types

Integer log level

A log object

Link to this section Types

Link to this type log_level() View Source
log_level() :: 10 | 20 | 30 | 40 | 50

Integer log level.

ValueLog level
10DEBUG
20INFO
30WARNING
40ERROR
50CRITICAL
Link to this type log_object() View Source
log_object() :: %{required(String.t()) => integer() | String.t() | log_level()}

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

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:

The opts value is documented here.

See docs here (GET method).

Example

ScrapyCloudEx.Endpoints.Storage.Logs.get("API_KEY", "14/13/12")