提交 b0e37dc3 编写于 作者: P Pablo Hoffman

renamed StackTraceDebug extension to StackTraceDump

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40707
上级 73074721
......@@ -147,13 +147,13 @@ settings:
Other conditions will be supported in the future.
Stack trace debug extension
Stack trace dump extension
---------------------------
.. module:: scrapy.contrib.debug
:synopsis: Extensions for debugging Scrapy
.. class:: scrapy.contrib.debug.StackTraceDebug
.. class:: scrapy.contrib.debug.StackTraceDump
Adds a `SIGUSR1`_ signal handler which dumps the stack trace of a runnning
Scrapy process when a ``SIGUSR1`` signal is catched. After the stack trace is
......
......@@ -350,7 +350,7 @@ Default::
'scrapy.contrib.pbcluster.ClusterMasterWeb',
'scrapy.contrib.pbcluster.ClusterCrawler',
'scrapy.contrib.closedomain.CloseDomain',
'scrapy.contrib.debug.StackTraceDebug',
'scrapy.contrib.debug.StackTraceDump',
'scrapy.contrib.response.soup.ResponseSoup',
]
......
......@@ -40,7 +40,7 @@ by a string: the full Python path to the extension's class name. For example::
'scrapy.management.telnet.TelnetConsole',
'scrapy.contrib.webconsole.enginestatus.EngineStatus',
'scrapy.contrib.webconsole.stats.StatsDump',
'scrapy.contrib.debug.StackTraceDebug',
'scrapy.contrib.debug.StackTraceDump',
]
......
......@@ -94,7 +94,7 @@ EXTENSIONS = [
'scrapy.contrib.pbcluster.ClusterMasterWeb',
'scrapy.contrib.pbcluster.ClusterCrawler',
'scrapy.contrib.closedomain.CloseDomain',
'scrapy.contrib.debug.StackTraceDebug',
'scrapy.contrib.debug.StackTraceDump',
'scrapy.contrib.response.soup.ResponseSoup',
]
......
"""
Extensions for debugging Scrapy
See documentation in docs/ref/extensions.rst
"""
import signal
import traceback
class StackTraceDebug(object):
class StackTraceDump(object):
def __init__(self):
try:
signal.signal(signal.SIGUSR1, self.dump_stacktrace)
......
"""
Crawler logging functionality
Scrapy logging facility
See documentation in docs/ref/logging.rst
"""
import sys
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册