Commit Graph

45 Commits

Author SHA1 Message Date
Alexander Chekunkov 795ca3945f keep level_names in scrapy.log for backwards compatibility 2015-05-21 08:56:44 +00:00
Julia Medina 6dccb3a9b3 Replace FailureFormatter with direct exc_info conversions in log calls 2015-05-15 05:46:14 -03:00
Julia Medina 4858af4e94 Fix backward compatible functions in scrapy.log 2015-04-22 17:27:24 -03:00
Julia Medina 4f54ca3294 Change 'scrapy' logger for '__name__' on every module 2015-04-22 17:24:41 -03:00
Julia Medina 21b9f377d6 Deprecate more frequently used functions from scrapy/log.py 2015-04-22 17:24:40 -03:00
Julia Medina c174d78f12 Deprecate scrapy/log.py 2015-04-22 17:24:40 -03:00
Julia Medina 900a487682 Support multiple simultaneous LogObservers listening different crawlers 2014-08-12 14:02:56 -03:00
Mikhail Korobov 9d3aa945f4 rename "sflo" local variables to less cryptic "log_observer" 2014-07-02 18:16:26 +06:00
Paul Tremberth 9f90c11246 Promote startup info on settings and middleware to INFO level 2014-01-09 19:37:06 +01:00
Nikolay Golub a651a75248 fix logging error with unicode spider name
Log message fails if spider name is in unicode, because "system" key in eventDict isn't encoded.
2013-11-30 21:08:56 +04:00
Alex Cepoi 9c092536c5 remove redundant kwarg 2013-08-21 01:52:36 +02:00
Alex Cepoi a9a911fb09 default to multi crawler commands
compatibility for old single crawler process
deprecated command's `crawler` property
logs about settings only shown once
2013-08-19 22:43:29 +02:00
Alex Cepoi 919d7c4062 command with multiple crawlers, fix check command 2013-07-08 17:00:43 +02:00
Pablo Hoffman 5a097cc192 log optional features available on startup 2013-06-04 19:25:26 -03:00
Pablo Hoffman 1a905d62f5 removed scrapy.log.started attribute, and avoid checking if log has already been started (since it should be called once anyway) 2012-10-09 16:05:19 -02:00
Pablo Hoffman bd3a109299 Track number of log messages via Scrapy stats
Log messages count are grouped per LEVEL like:

    'log_count/DEBUG': 8,
    'log_count/ERROR': 1,
    'log_count/INFO': 4,

This required passing the Crawler object to scrapy logging facility, so
the scrapy.log module underwent a few changes which should be backwards
compatible (or as backwards compatible as they could be).
2012-10-09 12:41:31 -02:00
Pablo Hoffman 768a483953 merge adding missing changes from previous commit 2012-09-19 03:19:03 -03:00
Pablo Hoffman c7f8219901 - removed scrapy.conf singleton from scrapy.log, scrapy.responsetypes,
scrapy.http.response.text, scrapy.selector
- fixed bug with scrapy.conf.settings backwards compatibility support
- added facility to notify (and provide some guidelines) about deprecated/obsolete settings
2012-09-19 03:03:34 -03:00
Pablo Hoffman aadf7ff143 - removed scrapy.conf singleton from scrapy.log, scrapy.responsetypes,
scrapy.http.response.text, scrapy.selector
- fixed bug with scrapy.conf.settings backwards compatibility support
- added facility to notify (and provide some guidelines) about deprecated/obsolete settings
2012-09-19 02:56:38 -03:00
Daniel Graña dcef7b03c1 format log lines lazily in case they are dropped by loglevels 2012-08-31 17:14:35 -03:00
Pablo Hoffman 9fddc73ed8 removed backwards compatibility code for old scrapy versions 2012-03-06 05:42:09 -02:00
Pablo Hoffman 0eaa1d95f6 replaced DeprecationWarning by a new ScrapyDeprecationWarning category, since the default DeprecationWarning is silenced on Python 2.7+ 2011-08-08 10:39:53 -03:00
Pablo Hoffman 0ffc8d29b6 Don't silence warnings after log is started. Closes #246 2010-09-22 01:00:34 -03:00
Pablo Hoffman aab38be498 Print Scrapy on first log line 2010-08-27 00:53:26 -03:00
Pablo Hoffman ad18d4a70e Added pluggable log formatter 2010-08-26 23:19:35 -03:00
Pablo Hoffman 2167bfb20d added prepend_level argument to log._adapt_eventdict() 2010-08-12 10:26:50 -03:00
Pablo Hoffman 2aa84073ab moved scrapy log observer logic into a separate function 2010-08-09 11:09:07 -03:00
Pablo Hoffman 4d66f4c6f8 Added support for logging twisted errors generated outside of Scrapy - refs #188 2010-08-05 20:46:54 -03:00
Pablo Hoffman 453e7bf38c Scrapy logging refactoring (closes #188):
* added Twisted log observer for Scrapy, with unittests
 * use numeric values from Python logging module for log levels
 * removed scrapy.log.exc() function - use scrapy.log.err() instead
 * removed logmessage_received signal - write a (twisted) log observer instead
 * dropped support for obsolete `domain` argument
 * dropped support for old setting names: LOGLEVEL, LOGFILE (replaced by LOG_LEVEL, LOG_FILE)
 * deprecated `component` argument
2010-08-02 08:49:14 -03:00
Rolando Espinoza La fuente db5c3df679 SEP12 implementation
* Rename BaseSpider.domain_name to BaseSpider.name

    This patch implements the domain_name to name change in BaseSpider class and
    change all spider instantiations to use the new attribute.

  * Add allowed_domains to spider

    This patch implements the merging of spider.domain_name and
    spider.extra_domain_names in spider.allowed_domains for offsite checking
    purposes.

    Note that spider.domain_name is not touched by this patch, only not used.

  * Remove spider.domain_name references from scrapy.stats

    * Rename domain_stats to spider_stats in MemoryStatsCollector
    * Use ``spider`` instead of ``domain`` in SimpledbStatsCollector
    * Rename domain_stats_history table to spider_data_history and rename domain
    field to spider in MysqlStatsCollector

  * Refactor genspider command

    The new signature for genspider is: genspider [options] <domain_name>.

    Genspider uses domain_name for spider name and for the module name.

  * Remove spider.domain_name references

  * Update crawl command signature <spider|url>

  * docs: updated references to domain_name

  * examples/experimental: use spider.name

  * genspider: require <name> <domain>

  * spidermanager: renamed crawl_domain to crawl_spider_name

  * spiderctl: updated references of *domain* to spider

  * added backward compatiblity with legacy spider's attributes
    'domain_name' and 'extra_domain_names'
2010-04-01 18:27:22 -03:00
Pablo Hoffman 4fa833c849 Added LOG_ENCODING setting 2010-03-24 12:13:38 -03:00
Pablo Hoffman b1c2756778 added spiders to some error logging in Engine and Scraper core components 2010-01-28 10:56:04 -02:00
Pablo Hoffman fee1b751e5 deprecated 'domain' argument in log.msg() 2009-11-06 16:02:12 -02:00
Pablo Hoffman 69058e3b50 fixed bug in log.msg when receiving new spider argument 2009-11-04 14:45:56 -02:00
Pablo Hoffman 97c322707a * Renamed domain_{opened,closed,idle} signals to spider_{opened,closed,idle}
* Changed them to pass spider instances only (no domains) (refs #105)
2009-11-03 00:39:02 -02:00
Pablo Hoffman d5ae94df55 fixed bug when using log.start() with log level module constants instead of string names, and added regression tests 2009-10-31 14:36:38 -02:00
Pablo Hoffman a7f5c6f878 Some enhancements to Scrapy core:
- added graceful shutdown (with one ^C) and forced shutdown (two ^C)
- added optional loglevel to IgnoreRequest exception
- calling Spider Manager close_domain() function from engine to avoid race
  conditions caused by signal dispatch order
- moved twisted reactor controlling logic outside the engine and into the
  scrapy manager
- made log.err function respect the current log level filter
2009-09-03 08:27:48 -03:00
Pablo Hoffman 11f296b753 removed hack for switching standard descriptors in favor of using LOG_STDOUT=False by default 2009-09-02 16:22:45 -03:00
Pablo Hoffman 45bc12e268 added scrapy.utils.pdb module with set_trace() function 2009-09-02 12:09:36 -03:00
Pablo Hoffman 9dc7a3a373 some minor adjustments to logging doc 2009-08-29 18:10:28 -03:00
Pablo Hoffman 609aed4553 added inspect_response() function for inspecting responses from spiders 2009-08-27 19:33:33 -03:00
Pablo Hoffman 37760eb13f improved consistency of logging settings to use LOG_* 2009-08-21 08:54:12 -03:00
Pablo Hoffman 41f1972e47 removed unused TRACE log level and improved logging documentation 2009-08-20 18:17:48 -03:00
Pablo Hoffman 06db0bc124 updated some documentation references in source code 2009-08-19 22:41:26 -03:00
Pablo Hoffman fde4f219a8 don't use packages when modules are enough
--HG--
rename : scrapy/extension/__init__.py => scrapy/extension.py
rename : scrapy/fetcher/__init__.py => scrapy/fetcher.py
rename : scrapy/log/__init__.py => scrapy/log.py
rename : scrapy/mail/__init__.py => scrapy/mail.py
rename : scrapy/patches/monkeypatches.py => scrapy/patches.py
2009-07-29 18:41:15 -03:00