MCPcopy
hub / github.com/scrapy/scrapy / log

Method log

scrapy/spiders/__init__.py:62–69  ·  view source on GitHub ↗

Log the given message at the given log level This helper wraps a log call to the logger within the spider, but you can use it directly (e.g. Spider.logger.info('msg')) or use any other Python logger too.

(self, message: Any, level: int = logging.DEBUG, **kw: Any)

Source from the content-addressed store, hash-verified

60 return SpiderLoggerAdapter(logger, {"spider": self})
61
62 def log(self, message: Any, level: int = logging.DEBUG, **kw: Any) -> None:
63 """Log the given message at the given log level
64
65 This helper wraps a log call to the logger within the spider, but you
66 can use it directly (e.g. Spider.logger.info('msg')) or use any other
67 Python logger too.
68 """
69 self.logger.log(level, message, **kw)
70
71 @classmethod
72 def from_crawler(cls, crawler: Crawler, *args: Any, **kwargs: Any) -> Self:

Callers 12

writeMethod · 0.45
_scrapeMethod · 0.45
handle_spider_errorMethod · 0.45
start_itemproc_asyncMethod · 0.45
enqueue_requestMethod · 0.45
_downloadMethod · 0.45
test_logMethod · 0.45
test_log_debugMethod · 0.45
test_log_deprecationMethod · 0.45
test_logMethod · 0.45

Calls

no outgoing calls

Tested by 6

test_logMethod · 0.36
test_log_debugMethod · 0.36
test_log_deprecationMethod · 0.36
test_logMethod · 0.36