From 59242268bd91a49481e197d1aa0e5bfddc471e8f Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 15 Aug 2014 12:25:44 +0200 Subject: [PATCH] http: improve the error logging --- src/http.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http.c b/src/http.c index 967ff980..eba23517 100644 --- a/src/http.c +++ b/src/http.c @@ -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);