From 939dd9f8176266add4d88572203739fa74b14fa5 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 19 May 2020 01:24:50 +0100 Subject: refactor(3p/nix/libexpr): Replace logging.h with glog --- third_party/nix/src/libexpr/parser.y | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'third_party/nix/src/libexpr/parser.y') 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 namespace nix { @@ -681,24 +681,23 @@ std::pair 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 -- cgit 1.4.1