about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/http-binary-cache-store.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-19T00·02+0100
committerVincent Ambo <tazjin@google.com>2020-05-19T00·04+0100
commit505b6b044b132b28e1501491bcfe6bd68ca1989e (patch)
tree1c1ed8a195f5c94050754316c842a3f8623c6cbe /third_party/nix/src/libstore/http-binary-cache-store.cc
parentce99ba42df493bb521f47789fb8902d7693c5b9c (diff)
refactor(3p/nix/libstore): Replace logging.h with glog r/756
Diffstat (limited to 'third_party/nix/src/libstore/http-binary-cache-store.cc')
-rw-r--r--third_party/nix/src/libstore/http-binary-cache-store.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/nix/src/libstore/http-binary-cache-store.cc b/third_party/nix/src/libstore/http-binary-cache-store.cc
index eb21babd51b8..06935ce61d76 100644
--- a/third_party/nix/src/libstore/http-binary-cache-store.cc
+++ b/third_party/nix/src/libstore/http-binary-cache-store.cc
@@ -1,3 +1,4 @@
+#include <glog/logging.h>
 #include "binary-cache-store.hh"
 #include "download.hh"
 #include "globals.hh"
@@ -45,7 +46,8 @@ class HttpBinaryCacheStore : public BinaryCacheStore {
     auto state(_state.lock());
     if (state->enabled && settings.tryFallback) {
       int t = 60;
-      printError("disabling binary cache '%s' for %s seconds", getUri(), t);
+      LOG(WARNING) << "disabling binary cache '" << getUri() << "' for " << t
+                   << " seconds";
       state->enabled = false;
       state->disabledUntil =
           std::chrono::steady_clock::now() + std::chrono::seconds(t);
@@ -57,7 +59,7 @@ class HttpBinaryCacheStore : public BinaryCacheStore {
     if (state->enabled) return;
     if (std::chrono::steady_clock::now() > state->disabledUntil) {
       state->enabled = true;
-      debug("re-enabling binary cache '%s'", getUri());
+      DLOG(INFO) << "re-enabling binary cache '" << getUri() << "'";
       return;
     }
     throw SubstituterDisabled("substituter '%s' is disabled", getUri());