Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log versions information at startup #2857

Merged
merged 2 commits into from Jul 27, 2017

Conversation

@redapple
Copy link
Contributor

@redapple redapple commented Jul 27, 2017

This is an example startup log with this patch:

$ scrapy shell
2017-07-27 17:22:09 [scrapy.utils.log] INFO: Scrapy 1.4.0 started (bot: scrapybot)
2017-07-27 17:22:09 [scrapy.utils.log] INFO: Versions: lxml 3.7.3.0, libxml2 2.9.3, cssselect 1.0.1, parsel 1.2.0, w3lib 1.17.0, Twisted 17.1.0, Python 2.7.12+ (default, Sep 17 2016, 12:08:02) - [GCC 6.2.0 20160914], pyOpenSSL 17.0.0 (OpenSSL 1.0.2g  1 Mar 2016), Platform Linux-4.8.0-59-generic-x86_64-with-Ubuntu-16.10-yakkety}
2017-07-27 17:22:09 [scrapy.utils.log] INFO: Overridden settings: {'LOGSTATS_INTERVAL': 0, 'DUPEFILTER_CLASS': 'scrapy.dupefilters.BaseDupeFilter'}

@kmike , were you thinking of something like this?

@codecov-io
Copy link

@codecov-io codecov-io commented Jul 27, 2017

Codecov Report

Merging #2857 into master will decrease coverage by <.01%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master    #2857      +/-   ##
==========================================
- Coverage    84.7%   84.69%   -0.01%     
==========================================
  Files         163      164       +1     
  Lines        9191     9189       -2     
  Branches     1367     1369       +2     
==========================================
- Hits         7785     7783       -2     
  Misses       1154     1154              
  Partials      252      252
Impacted Files Coverage Δ
scrapy/commands/version.py 100% <100%> (+8.88%) ⬆️
scrapy/utils/log.py 88.76% <100%> (+0.25%) ⬆️
scrapy/utils/versions.py 82.6% <82.6%> (ø)
@kmike
Copy link
Member

@kmike kmike commented Jul 27, 2017

Looks awesome!

What do you think about creating something like scrapy.utils.versions instead of putting it to utils.log?

@redapple redapple force-pushed the redapple:scrapy-components-logs-startup branch from db2c494 to bf7ef3e Jul 27, 2017
@kmike kmike merged commit 9d34b2f into scrapy:master Jul 27, 2017
2 checks passed
2 checks passed
codecov/patch 85.71% of diff hit (target 84.7%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kmike
Copy link
Member

@kmike kmike commented Jul 27, 2017

Thanks @redapple! This PR would make it easier to debug issues.

@kmike kmike added this to the v1.5 milestone Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants