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

Get rid of LOGGER.error in SimpleHttpFetcher #14

Open
kkrugler opened this issue Dec 21, 2017 · 0 comments
Open

Get rid of LOGGER.error in SimpleHttpFetcher #14

kkrugler opened this issue Dec 21, 2017 · 0 comments
Assignees

Comments

@kkrugler
Copy link
Contributor

Currently we have:

            } else if (e.getCause() instanceof RedirectException) {
                LOGGER.error(e.getMessage());
                throw new RedirectFetchException(url, extractRedirectedUrl(url, localContext), RedirectExceptionReason.TOO_MANY_REDIRECTS);
            } else {

But we're throwing RedirectFetchException, so we shouldn't be logging anything. And the e.getMessage() call returns an empty string, so you get:

ERROR crawlercommons.fetcher.http.SimpleHttpFetcher                 - 

In the logs, which isn't very useful.

@kkrugler kkrugler self-assigned this Dec 21, 2017
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

No branches or pull requests

1 participant