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

Error logging when duplicate request found #75

Closed
alex1993 opened this issue Oct 18, 2016 · 1 comment
Closed

Error logging when duplicate request found #75

alex1993 opened this issue Oct 18, 2016 · 1 comment
Labels

Comments

@alex1993
Copy link

When duplicate requests found, it only record the first duplicate url, no more message.

in file dupfilter.py function log, msg is overriden...

def log(self, request, spider):
        """Logs given request.
        Parameters
        ----------
        request : scrapy.http.Request
        spider : scrapy.spiders.Spider
        """
        if self.debug:
            msg = "Filtered duplicate request: %(request)s"
            self.logger.debug(msg, {'request': request}, extra={'spider': spider})
        elif self.logdupes:
            msg = ("Filtered duplicate request %(request)s"
                   " - no more duplicates will be shown"
                   " (see DUPEFILTER_DEBUG to show all duplicates)")
            msg = "Filtered duplicate request: %(request)s"
            self.logger.debug(msg, {'request': request}, extra={'spider': spider})
            self.logdupes = False
@rmax
Copy link
Owner

rmax commented Oct 18, 2016

You are right!

@rmax rmax added the bug label Oct 18, 2016
@rmax rmax closed this as completed in e4a42dd Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants