From c55bf085eb914bd06bba00670a293b3c0528b81f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Sep 2016 16:11:01 +0200 Subject: printMsg(lvlError, ...) -> printError(...) etc. --- src/libstore/download.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/libstore/download.cc') diff --git a/src/libstore/download.cc b/src/libstore/download.cc index d7d0e29c0626..22a3f969c7c1 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -265,7 +265,7 @@ struct CurlDownloader : public Downloader download after a while. */ if (err == Transient && attempt < request.tries) { int ms = request.baseRetryTimeMs * std::pow(2.0f, attempt - 1 + std::uniform_real_distribution<>(0.0, 0.5)(downloader.mt19937)); - printMsg(lvlError, format("warning: %s; retrying in %d ms") % exc.what() % ms); + printError(format("warning: %s; retrying in %d ms") % exc.what() % ms); embargo = std::chrono::steady_clock::now() + std::chrono::milliseconds(ms); downloader.enqueueItem(shared_from_this()); } @@ -420,7 +420,7 @@ struct CurlDownloader : public Downloader workerThreadMain(); } catch (nix::Interrupted & e) { } catch (std::exception & e) { - printMsg(lvlError, format("unexpected error in download thread: %s") % e.what()); + printError(format("unexpected error in download thread: %s") % e.what()); } { @@ -522,7 +522,7 @@ Path Downloader::downloadCached(ref store, const string & url_, bool unpa if (effectiveUrl) *effectiveUrl = url_; } else if (!ss[1].empty()) { - printMsg(lvlDebug, format("verifying previous ETag ‘%1%’") % ss[1]); + debug(format("verifying previous ETag ‘%1%’") % ss[1]); expectedETag = ss[1]; } } @@ -556,7 +556,7 @@ Path Downloader::downloadCached(ref store, const string & url_, bool unpa writeFile(dataFile, url + "\n" + res.etag + "\n" + std::to_string(time(0)) + "\n"); } catch (DownloadError & e) { if (storePath.empty()) throw; - printMsg(lvlError, format("warning: %1%; using cached result") % e.msg()); + printError(format("warning: %1%; using cached result") % e.msg()); } } @@ -570,7 +570,7 @@ Path Downloader::downloadCached(ref store, const string & url_, bool unpa unpackedStorePath = ""; } if (unpackedStorePath.empty()) { - printMsg(lvlInfo, format("unpacking ‘%1%’...") % url); + printInfo(format("unpacking ‘%1%’...") % url); Path tmpDir = createTempDir(); AutoDelete autoDelete(tmpDir, true); // FIXME: this requires GNU tar for decompression. -- cgit 1.4.1