Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
http: improve the error logging
  • Loading branch information
perexg committed Aug 15, 2014
1 parent c66edd2 commit 5924226
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/http.c
Expand Up @@ -313,8 +313,9 @@ http_error(http_connection_t *hc, int error)

tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrstr, 50);

tvhlog(LOG_ERR, "HTTP", "%s: %s -- %d",
addrstr, hc->hc_url, error);
if (error != HTTP_STATUS_FOUND && error != HTTP_STATUS_MOVED)
tvhlog(error < 400 ? LOG_INFO : LOG_ERR, "HTTP", "%s: %s -- %d",
addrstr, hc->hc_url, error);

htsbuf_queue_flush(&hc->hc_reply);

Expand Down

0 comments on commit 5924226

Please sign in to comment.