From 875735977562e7b685e781255be5051059fd9be2 Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Thu, 2 Apr 2009 22:43:52 +0000 Subject: [PATCH] doc: added note about logging from spiders --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%401030 --- scrapy/trunk/docs/ref/logging.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scrapy/trunk/docs/ref/logging.rst b/scrapy/trunk/docs/ref/logging.rst index 3a2caa518..734401d77 100644 --- a/scrapy/trunk/docs/ref/logging.rst +++ b/scrapy/trunk/docs/ref/logging.rst @@ -83,3 +83,12 @@ scrapy.log module ``component`` - same as ``msg()`` function ``domain`` - same as ``msg()`` function + +Logging from Spiders +==================== + +The recommended way for logging from spiders is to use the Spider ``log()`` +method, which already populates the :func:`~scrapy.log.msg` ``domain`` +argument. The other arguments of the Spider ``log()`` method are the same as +the :func:`~scrapy.log.msg` function. +