about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/primops.cc
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/primops.cc
parentd0c44425e147ab7d38410f400825ad20da15037b (diff)
refactor(3p/nix/libexpr): Replace logging.h with glog r/758
Diffstat (limited to 'third_party/nix/src/libexpr/primops.cc')
-rw-r--r--third_party/nix/src/libexpr/primops.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/third_party/nix/src/libexpr/primops.cc b/third_party/nix/src/libexpr/primops.cc
index 9d6d4eaba5..05fa9c4828 100644
--- a/third_party/nix/src/libexpr/primops.cc
+++ b/third_party/nix/src/libexpr/primops.cc
@@ -19,6 +19,7 @@
 #include "util.hh"
 #include "value-to-json.hh"
 #include "value-to-xml.hh"
+#include <glog/logging.h>
 
 namespace nix {
 
@@ -139,7 +140,7 @@ static void prim_scopedImport(EvalState& state, const Pos& pos, Value** args,
         env->values[displ++] = attr.value;
       }
 
-      printTalkative("evaluating file '%1%'", realPath);
+      DLOG(INFO) << "evaluating file '" << realPath << "'";
       Expr* e = state.parseExprFromFile(resolveExprPath(realPath), staticEnv);
 
       e->eval(state, *env, v);
@@ -504,10 +505,11 @@ static void prim_deepSeq(EvalState& state, const Pos& pos, Value** args,
 static void prim_trace(EvalState& state, const Pos& pos, Value** args,
                        Value& v) {
   state.forceValue(*args[0]);
-  if (args[0]->type == tString)
-    printError(format("trace: %1%") % args[0]->string.s);
-  else
-    printError(format("trace: %1%") % *args[0]);
+  if (args[0]->type == tString) {
+    DLOG(INFO) << "trace: " << args[0]->string.s;
+  } else {
+    DLOG(INFO)<< "trace: " << *args[0];
+  }
   state.forceValue(*args[1]);
   v = *args[1];
 }
@@ -575,7 +577,6 @@ static void prim_derivationStrict(EvalState& state, const Pos& pos,
   for (auto& i : args[0]->attrs->lexicographicOrder()) {
     if (i->name == state.sIgnoreNulls) continue;
     const string& key = i->name;
-    vomit("processing attribute '%1%'", key);
 
     auto handleHashMode = [&](const std::string& s) {
       if (s == "recursive")
@@ -781,8 +782,7 @@ static void prim_derivationStrict(EvalState& state, const Pos& pos,
   /* Write the resulting term into the Nix store directory. */
   Path drvPath = writeDerivation(state.store, drv, drvName, state.repair);
 
-  printMsg(lvlChatty,
-           format("instantiated '%1%' -> '%2%'") % drvName % drvPath);
+  DLOG(INFO) << "instantiated '" << drvName << "' -> '" << drvPath << "'";
 
   /* Optimisation, but required in read-only mode! because in that
      case we don't actually write store derivations, so we can't