summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Sloughter <tristan.sloughter@gmail.com>2015-09-01 20:09:12 -0500
committerTristan Sloughter <tristan.sloughter@gmail.com>2015-09-01 20:09:12 -0500
commite385c19168aadf043adadfb3ea0bb314113d845c (patch)
treedcfd226d8ad4588e26ab0c37dcf545cb8455a1d5 /src
parent0775af04e7e9f2aa9f1ac4d37dfe19534e0394d3 (diff)
parente4a52170414330494121428afd8dfa1e884769bf (diff)
Merge pull request #762 from ferd/explicit-cache-paths
Displays package caching actions
Diffstat (limited to 'src')
-rw-r--r--src/rebar_pkg_resource.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rebar_pkg_resource.erl b/src/rebar_pkg_resource.erl
index 3430e81..4ac0a1d 100644
--- a/src/rebar_pkg_resource.erl
+++ b/src/rebar_pkg_resource.erl
@@ -37,11 +37,13 @@ download(TmpDir, Pkg={pkg, Name, Vsn}, State) ->
cached_download(TmpDir, CachePath, Pkg={pkg, Name, Vsn}, Url, ETag, State) ->
case request(Url, ETag) of
{ok, cached} ->
+ ?INFO("Version cached at ~s is up to date, reusing it", [CachePath]),
serve_from_cache(TmpDir, CachePath, Pkg, State);
{ok, Body, NewETag} ->
+ ?INFO("Downloaded package, caching at ~s", [CachePath]),
serve_from_download(TmpDir, CachePath, Pkg, NewETag, Body, State);
error when ETag =/= false ->
- ?DEBUG("Download ~s error, using ~s from cache", [Url, CachePath]),
+ ?INFO("Download error, using cached file at ~s", [CachePath]),
serve_from_cache(TmpDir, CachePath, Pkg, State);
error ->
{fetch_fail, Name, Vsn}