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

remove item from being logged in DropItem to prevent dupe logs #23

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

BurnzZ
Copy link
Contributor

@BurnzZ BurnzZ commented Jul 31, 2024

Missed the fact that by default, Scrapy already logs the item that was dropped. Ref: https://github.com/scrapy/scrapy/blob/master/scrapy/logformatter.py#L22.

This PR prevents the dropped item from being logged twice:

image

@BurnzZ BurnzZ requested a review from Gallaecio July 31, 2024 00:27
@BurnzZ
Copy link
Contributor Author

BurnzZ commented Jul 31, 2024

On a similar note, @Gallaecio what do you think about the code example in https://docs.scrapy.org/en/latest/topics/item-pipeline.html being updated to prevent the dropped item from being logged twice as well?

@BurnzZ BurnzZ merged commit 9690846 into main Jul 31, 2024
8 checks passed
@wRAR wRAR deleted the fix-drop-msg branch October 15, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants