about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/parser.y
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-19T00·24+0100
committerVincent Ambo <tazjin@google.com>2020-05-19T00·24+0100
commit939dd9f8176266add4d88572203739fa74b14fa5 (patch)
treea1458c60656ee8d11651888b3b622039e65d8bca /third_party/nix/src/libexpr/parser.y
parentd0c44425e147ab7d38410f400825ad20da15037b (diff)
refactor(3p/nix/libexpr): Replace logging.h with glog r/758
Diffstat (limited to 'third_party/nix/src/libexpr/parser.y')
-rw-r--r--third_party/nix/src/libexpr/parser.y19
1 files changed, 9 insertions, 10 deletions
diff --git a/third_party/nix/src/libexpr/parser.y b/third_party/nix/src/libexpr/parser.y
index 967c88d9bc80..ddcd1a4dae74 100644
--- a/third_party/nix/src/libexpr/parser.y
+++ b/third_party/nix/src/libexpr/parser.y
@@ -17,9 +17,9 @@
 #define BISON_HEADER
 
 #include "util.hh"
-
 #include "nixexpr.hh"
 #include "eval.hh"
+#include <glog/logging.h>
 
 namespace nix {
 
@@ -681,24 +681,23 @@ std::pair<bool, std::string> EvalState::resolveSearchPathElem(const SearchPathEl
             request.unpack = true;
             res = { true, getDownloader()->downloadCached(store, request).path };
         } catch (DownloadError & e) {
-            printError(format("warning: Nix search path entry '%1%' cannot be downloaded, ignoring") % elem.second);
-            res = { false, "" };
+          LOG(WARNING) << "Nix search path entry '" << elem.second << "' cannot be downloaded, ignoring";
+          res = { false, "" };
         }
     } else {
         auto path = absPath(elem.second);
-        if (pathExists(path))
+        if (pathExists(path)) {
             res = { true, path };
-        else {
-            printError(format("warning: Nix search path entry '%1%' does not exist, ignoring") % elem.second);
-            res = { false, "" };
+        } else {
+          LOG(WARNING) << "Nix search path entry '" << elem.second << "' does not exist, ignoring";
+          res = { false, "" };
         }
     }
 
-    debug(format("resolved search path element '%s' to '%s'") % elem.second % res.second);
+    DLOG(INFO) << "resolved search path element '" << elem.second << "' to '" << res.second << "'";
 
     searchPathResolved[elem.second] = res;
     return res;
 }
 
-
-}
+}  // namespace nix