about summary refs log tree commit diff
path: root/third_party/nix/src/nix/repl.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-19T03·52+0100
committerVincent Ambo <tazjin@google.com>2020-05-19T03·52+0100
commit95a57f15ca795eb1b36363b7d6db6b88bfe444e2 (patch)
treead9328cded554eb7d3e153075c6750a17ca39803 /third_party/nix/src/nix/repl.cc
parent9aa2ecd78cc865f69a9e978ae55ab0f3eda73c46 (diff)
refactor(3p/nix/nix-*): Replace logging with glog in binaries r/762
Diffstat (limited to 'third_party/nix/src/nix/repl.cc')
-rw-r--r--third_party/nix/src/nix/repl.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/third_party/nix/src/nix/repl.cc b/third_party/nix/src/nix/repl.cc
index 72609fb164..c473380734 100644
--- a/third_party/nix/src/nix/repl.cc
+++ b/third_party/nix/src/nix/repl.cc
@@ -1,3 +1,4 @@
+#include <glog/logging.h>
 #include <setjmp.h>
 #include <climits>
 #include <cstdlib>
@@ -242,16 +243,13 @@ void NixRepl::mainLoop(const std::vector<std::string>& files) {
         // next line of input without clearing the input so far.
         continue;
       } else {
-        printMsg(lvlError, format(error + "%1%%2%") %
-                               (settings.showTrace ? e.prefix() : "") %
-                               e.msg());
+        LOG(ERROR) << error << (settings.showTrace ? e.prefix() : "")
+                   << e.msg();
       }
     } catch (Error& e) {
-      printMsg(lvlError, format(error + "%1%%2%") %
-                             (settings.showTrace ? e.prefix() : "") % e.msg());
+      LOG(ERROR) << error << (settings.showTrace ? e.prefix() : "") << e.msg();
     } catch (Interrupted& e) {
-      printMsg(lvlError, format(error + "%1%%2%") %
-                             (settings.showTrace ? e.prefix() : "") % e.msg());
+      LOG(ERROR) << error << (settings.showTrace ? e.prefix() : "") << e.msg();
     }
 
     // We handled the current input fully, so we should clear it