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

[MRG+1] Fix logging of enabled middlewares #1722

Merged
merged 1 commit into from Jan 26, 2016
Merged

Conversation

@redapple
Copy link
Contributor

@redapple redapple commented Jan 26, 2016

Wrong middlewares list was being pretty-printed
(introduced in #1263)

I noticed this while trying to disabled CloseSpider, it was still appearing in scrapy shell

Before (current master branch)

2016-01-26 12:44:20 [scrapy] INFO: Enabled extensions:
['scrapy.extensions.closespider.CloseSpider',
 'scrapy.extensions.feedexport.FeedExporter',
 'scrapy.extensions.memdebug.MemoryDebugger',
 'scrapy.extensions.memusage.MemoryUsage',
 'scrapy.extensions.logstats.LogStats',
 'scrapy.extensions.telnet.TelnetConsole',
 'scrapy.extensions.corestats.CoreStats',
 'scrapy.extensions.spiderstate.SpiderState',
 'scrapy.extensions.throttle.AutoThrottle']

With this fix, it now shows like this:

2016-01-26 12:54:53 [scrapy] INFO: Enabled extensions:
['scrapy.extensions.telnet.TelnetConsole',
 'scrapy.extensions.corestats.CoreStats',
 'scrapy.extensions.spiderstate.SpiderState']
Wrong middlewares list was being pretty-printed
(introduced in #1263)
@redapple redapple added this to the v1.1 milestone Jan 26, 2016
@codecov-io
Copy link

@codecov-io codecov-io commented Jan 26, 2016

Current coverage is 83.25%

Merging #1722 into master will not affect coverage as of e87f64d

Powered by Codecov. Updated on successful CI builds.

@eliasdorneles
Copy link
Member

@eliasdorneles eliasdorneles commented Jan 26, 2016

LGTM

@eliasdorneles eliasdorneles changed the title Fix logging of enabled middlewares [MRG+1] Fix logging of enabled middlewares Jan 26, 2016
kmike added a commit that referenced this pull request Jan 26, 2016
[MRG+1] Fix logging of enabled middlewares
@kmike kmike merged commit 1e48574 into scrapy:master Jan 26, 2016
2 checks passed
2 checks passed
codecov/patch 100.00% of diff hit (target 100.00%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@redapple
Copy link
Contributor Author

@redapple redapple commented Jan 26, 2016

@kmike , @eliasdorneles , sorry, it seems I pushed the wrong version:
with this patch in master, you currently get the short names:

2016-01-26 15:27:23 [scrapy] INFO: Enabled extensions:
['TelnetConsole', 'CoreStats']
2016-01-26 15:27:23 [scrapy] INFO: Enabled downloader middlewares:
['HttpAuthMiddleware',
 'DownloadTimeoutMiddleware',
 'UserAgentMiddleware',
 'RetryMiddleware',
 'DefaultHeadersMiddleware',
 'MetaRefreshMiddleware',
 'HttpCompressionMiddleware',
 'RedirectMiddleware',
 'CookiesMiddleware',
 'ChunkedTransferMiddleware',
 'DownloaderStats']
2016-01-26 15:27:23 [scrapy] INFO: Enabled spider middlewares:
['HttpErrorMiddleware',
 'OffsiteMiddleware',
 'RefererMiddleware',
 'UrlLengthMiddleware',
 'DepthMiddleware']

instead of 'scrapy.extensions.corestats.CoreStats' and the likes

I will submit a new PR on top of this

@redapple
Copy link
Contributor Author

@redapple redapple commented Jan 26, 2016

Fixed in #1726

@chekunkov
Copy link
Contributor

@chekunkov chekunkov commented Feb 5, 2016

👍

Ugh, missed that somewhere in the middle of discussion while was experimenting with output formats :/

@redapple redapple deleted the redapple:mwlist-logging branch Jul 8, 2016
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

5 participants
You can’t perform that action at this time.