Scrapy, a fast high-level web crawling & scraping framework for Python.
updated logging doc to include new spider argument in log functions
Pablo Hoffmana432c1ee40fe
diff --git a/docs/topics/logging.rst b/docs/topics/logging.rstindex b9ab1d133..f57128287 100644--- a/docs/topics/logging.rst+++ b/docs/topics/logging.rst@@ -44,7 +44,7 @@ Logging from SpidersThe recommended way to log from spiders is by using the Spider:meth:`~scrapy.spider.BaseSpider.log` method, which already populates the-``domain`` argument of the :func:`scrapy.log.msg` function. The other arguments+``spider`` argument of the :func:`scrapy.log.msg` function. The other argumentsare passed directly to the :func:`~scrapy.log.msg` function.scrapy.log module@@ -81,7 +81,7 @@ scrapy.log modulesetting will be used.:type logstdout: boolean-.. function:: msg(message, level=INFO, component=BOT_NAME, domain=None)+.. function:: msg(message, level=INFO, component=BOT_NAME, spider=None)Log a message@@ -95,12 +95,12 @@ scrapy.log module:setting:`BOT_NAME`:type component: str- :param domain: the spider domain to use for logging this message. This- parameter should always be used when logging things related to a- particular spider.- :type domain: str+ :param spider: the spider to use for logging this message. This parameter+ should always be used when logging things related to a particular+ spider.+ :type spider: :class:`~scrapy.spider.BaseSpider` object-.. function:: exc(message, level=ERROR, component=BOT_NAME, domain=None)+.. function:: exc(message, level=ERROR, component=BOT_NAME, spider=None)Log an exception. Similar to ``msg()`` but it also appends a stack tracereport using `traceback.format_exc`.