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

Logformatter for errors #3986

Closed
mredaelli opened this issue Aug 29, 2019 · 0 comments · Fixed by #3989
Closed

Logformatter for errors #3986

mredaelli opened this issue Aug 29, 2019 · 0 comments · Fixed by #3989

Comments

@mredaelli
Copy link

@mredaelli mredaelli commented Aug 29, 2019

Summary

Allow users to specify the logging behaviour in case of errors in the item pipeline

Motivation

Looking at https://github.com/scrapy/scrapy/blob/3adf09bc4f1468f54a703481d6d7ebfe25b6f232/scrapy/core/scraper.py, it is possible to override the logging behaviour for the DropItem exception, but there is no equivalent
self.logformatter.error.

In our case, sometimes the item can be very large, in which case it being printed completely to the log is problematic -- specifically, on ScrapyingHub the log entry is refused and the exception is not visible.

Describe alternatives you've considered

Modify that file adding a generic error logformatter function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants