about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/machines.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/machines.cc
parentce99ba42df493bb521f47789fb8902d7693c5b9c (diff)
refactor(3p/nix/libstore): Replace logging.h with glog r/756
Diffstat (limited to 'third_party/nix/src/libstore/machines.cc')
-rw-r--r--third_party/nix/src/libstore/machines.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/machines.cc b/third_party/nix/src/libstore/machines.cc
index 526afdbbc0..0bd65c2302 100644
--- a/third_party/nix/src/libstore/machines.cc
+++ b/third_party/nix/src/libstore/machines.cc
@@ -1,4 +1,5 @@
 #include "machines.hh"
+#include <glog/logging.h>
 #include <algorithm>
 #include "globals.hh"
 #include "util.hh"
@@ -53,15 +54,19 @@ void parseMachines(const std::string& s, Machines& machines) {
       try {
         parseMachines(readFile(file), machines);
       } catch (const SysError& e) {
-        if (e.errNo != ENOENT) throw;
-        debug("cannot find machines file '%s'", file);
+        if (e.errNo != ENOENT) {
+          throw;
+        }
+        DLOG(INFO) << "cannot find machines file: " << file;
       }
       continue;
     }
 
     auto tokens = tokenizeString<std::vector<string>>(line);
     auto sz = tokens.size();
-    if (sz < 1) throw FormatError("bad machine specification '%s'", line);
+    if (sz < 1) {
+      throw FormatError("bad machine specification '%s'", line);
+    }
 
     auto isSet = [&](size_t n) {
       return tokens.size() > n && tokens[n] != "" && tokens[n] != "-";