From 56138a0b8569ab9fcffb1b69f8fad9df4385f3ae Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:11:11 -0400 Subject: [PATCH] docs: Describe log file naming #504 --- docs/api.rst | 5 ++++- docs/config.rst | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/api.rst b/docs/api.rst index 5125742c..6cb979d8 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -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 diff --git a/docs/config.rst b/docs/config.rst index 86c919ab..5538d3c2 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -91,6 +91,8 @@ dbs_dir The directory where the project databases will be stored (this includes the spider queues). +.. _logs_dir: + logs_dir ~~~~~~~~