From: mtortonesi Date: Mon, 30 Jan 2006 08:54:09 +0000 (-0800) Subject: [svn] Commited new HTTP output format. X-Git-Tag: v1.13~692 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=b5be7ce3012ee3a57d8f1e12ccfad5dd996dfba0 [svn] Commited new HTTP output format. --- diff --git a/src/ChangeLog b/src/ChangeLog index 5c3556b9..36ff4a1c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-01-30 Mauro Tortonesi + + * http.c: Changed output format. Removed excessively verbose debugging + output. + 2005-12-07 Mauro Tortonesi * http.c: Fixed pre-download verbose output which was broken by diff --git a/src/http.c b/src/http.c index a882c2d1..a698e636 100644 --- a/src/http.c +++ b/src/http.c @@ -1200,8 +1200,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) bool host_lookup_failed = false; - DEBUGP(("in gethttp 1\n")); - #ifdef HAVE_SSL if (u->scheme == SCHEME_HTTPS) { @@ -1217,9 +1215,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) } #endif /* HAVE_SSL */ - DEBUGP(("in gethttp 2\n")); - DEBUGP(("in gethttp 3\n")); - /* Initialize certain elements of struct http_stat. */ hs->len = 0; hs->contlen = -1; @@ -1609,8 +1604,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) print_server_response (resp, " "); } - DEBUGP(("in gethttp 4\n")); - /* Determine the local filename if needed. Notice that if -O is used * hstat.local_file is set by http_loop to the argument of -O. */ if (!hs->local_file) @@ -1627,8 +1620,6 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy) } } - DEBUGP(("in gethttp 5\n")); - /* TODO: perform this check only once. */ if (opt.noclobber && file_exists_p (hs->local_file)) { @@ -2013,6 +2004,13 @@ File `%s' already there; not retrieving.\n\n"), hs->local_file); return RETRFINISHED; } + /* Print fetch message, if opt.verbose. */ + if (opt.verbose) + { + logprintf (LOG_NOTQUIET, _("\nStoring resource in file: `%s'\n"), + HYPHENP (hs->local_file) ? "STDOUT" : hs->local_file); + } + /* Open the local file. */ if (!output_stream) { @@ -2106,8 +2104,6 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer, struct http_stat hstat; /* HTTP status */ struct_stat st; - DEBUGP(("in http_loop\n")); - /* Assert that no value for *LOCAL_FILE was passed. */ assert (local_file == NULL || *local_file == NULL); @@ -2144,8 +2140,6 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer, /* THE loop */ do { - DEBUGP(("in http_loop LOOP\n")); - /* Increment the pass counter. */ ++count; sleep_between_retrievals (count); @@ -2157,28 +2151,18 @@ http_loop (struct url *u, char **newloc, char **local_file, const char *referer, if (opt.verbose) { char *hurl = url_string (u, true); - logprintf (LOG_VERBOSE, "--%s-- %s\n", - tms, hurl); if (count > 1) { char tmp[256]; sprintf (tmp, _("(try:%2d)"), count); - logprintf (LOG_VERBOSE, " %s", tmp); + logprintf (LOG_NOTQUIET, "--%s-- %s %s\n\n", + tms, tmp, hurl); } else { - logprintf (LOG_VERBOSE, " "); - } - - if (hstat.local_file) - { - logprintf (LOG_VERBOSE, " => `%s'\n", - HYPHENP (hstat.local_file) ? "STDOUT" : hstat.local_file); - } - else - { - logprintf (LOG_VERBOSE, "\n"); + logprintf (LOG_NOTQUIET, "--%s-- %s\n\n", + tms, hurl); } #ifdef WINDOWS @@ -2352,6 +2336,8 @@ The sizes do not match (local %s) -- retrieving.\n"), else logputs (LOG_VERBOSE, _("Remote file is newer, retrieving.\n")); + + logputs (LOG_VERBOSE, "\n"); } /* free_hstat (&hstat); */