diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-19T03·52+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-19T03·52+0100 |
commit | 95a57f15ca795eb1b36363b7d6db6b88bfe444e2 (patch) | |
tree | ad9328cded554eb7d3e153075c6750a17ca39803 /third_party/nix/src/nix/search.cc | |
parent | 9aa2ecd78cc865f69a9e978ae55ab0f3eda73c46 (diff) |
refactor(3p/nix/nix-*): Replace logging with glog in binaries r/762
Diffstat (limited to 'third_party/nix/src/nix/search.cc')
-rw-r--r-- | third_party/nix/src/nix/search.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/nix/search.cc b/third_party/nix/src/nix/search.cc index fab8bba6283a..90aea17a6e39 100644 --- a/third_party/nix/src/nix/search.cc +++ b/third_party/nix/src/nix/search.cc @@ -1,3 +1,4 @@ +#include <glog/logging.h> #include <fstream> #include <regex> #include "command.hh" @@ -99,7 +100,7 @@ struct CmdSearch : SourceExprCommand, MixJSON { doExpr = [&](Value* v, std::string attrPath, bool toplevel, JSONObject* cache) { - debug("at attribute '%s'", attrPath); + DLOG(INFO) << "at attribute '" << attrPath << "'"; try { uint found = 0; @@ -174,7 +175,7 @@ struct CmdSearch : SourceExprCommand, MixJSON { auto attrs = v->attrs; Bindings::iterator j = attrs->find(sRecurse); if (j == attrs->end() || !state->forceBool(*j->value, *j->pos)) { - debug("skip attribute '%s'", attrPath); + DLOG(INFO) << "skip attribute '" << attrPath << "'"; return; } } @@ -209,7 +210,7 @@ struct CmdSearch : SourceExprCommand, MixJSON { Path jsonCacheFileName = getCacheDir() + "/nix/package-search.json"; if (useCache && pathExists(jsonCacheFileName)) { - warn("using cached results; pass '-u' to update the cache"); + LOG(WARNING) << "using cached results; pass '-u' to update the cache"; Value vRoot; parseJSON(*state, readFile(jsonCacheFileName), vRoot); |