Skip to content

Commit

Permalink
docs: Describe log file naming #504
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jun 18, 2024
1 parent f7eaea3 commit 56138a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,14 @@ Schedule a spider run (also known as a job), returning the job id.
* ``project`` (string, required) - the project name
* ``spider`` (string, required) - the spider name
* ``setting`` (string, optional) - a Scrapy setting to use when running the spider
* ``jobid`` (string, optional) - a job id used to identify the job, overrides the default generated UUID
* ``jobid`` (string, optional) - a job ID to identify the job, overrides the default hexadecimal UUIDv1
* ``priority`` (float, optional) - priority for this project's spider queue — 0 by default
* ``_version`` (string, optional) - the version of the project to use
* any other parameter is passed as spider argument

If the :ref:`logs_dir` setting is set, log files are written to ``{logs_dir}/{project}/{spider}/{jobid}.log``.
Set the ``jobid`` parameter to configure the basename of the log file.

Example request::

$ curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider
Expand Down
2 changes: 2 additions & 0 deletions docs/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ dbs_dir
The directory where the project databases will be stored (this includes the
spider queues).

.. _logs_dir:

logs_dir
~~~~~~~~

Expand Down

0 comments on commit 56138a0

Please sign in to comment.