diff options
Diffstat (limited to 'third_party/nix/src/libstore/builtins')
-rw-r--r-- | third_party/nix/src/libstore/builtins/buildenv.cc | 11 | ||||
-rw-r--r-- | third_party/nix/src/libstore/builtins/fetchurl.cc | 3 |
2 files changed, 7 insertions, 7 deletions
diff --git a/third_party/nix/src/libstore/builtins/buildenv.cc b/third_party/nix/src/libstore/builtins/buildenv.cc index ce054a430309..68b2dd0f391d 100644 --- a/third_party/nix/src/libstore/builtins/buildenv.cc +++ b/third_party/nix/src/libstore/builtins/buildenv.cc @@ -1,4 +1,5 @@ #include <fcntl.h> +#include <glog/logging.h> #include <sys/stat.h> #include <sys/types.h> #include <algorithm> @@ -22,10 +23,8 @@ static void createLinks(const Path& srcDir, const Path& dstDir, int priority) { srcFiles = readDirectory(srcDir); } catch (SysError& e) { if (e.errNo == ENOTDIR) { - printError( - "warning: not including '%s' in the user environment because it's " - "not a directory", - srcDir); + LOG(ERROR) << "warning: not including '" << srcDir + << "' in the user environment because it's not a directory"; return; } throw; @@ -43,7 +42,7 @@ static void createLinks(const Path& srcDir, const Path& dstDir, int priority) { throw SysError("getting status of '%1%'", srcFile); } catch (SysError& e) { if (e.errNo == ENOENT || e.errNo == ENOTDIR) { - printError("warning: skipping dangling symlink '%s'", dstFile); + LOG(ERROR) << "warning: skipping dangling symlink '" << dstFile << "'"; continue; } throw; @@ -200,7 +199,7 @@ void builtinBuildenv(const BasicDerivation& drv) { for (const auto& pkgDir : pkgDirs) addPkg(pkgDir, priorityCounter++); } - printError("created %d symlinks in user environment", symlinks); + LOG(INFO) << "created " << symlinks << " symlinks in user environment"; createSymlink(getAttr("manifest"), out + "/manifest.nix"); } diff --git a/third_party/nix/src/libstore/builtins/fetchurl.cc b/third_party/nix/src/libstore/builtins/fetchurl.cc index ae4e9a71c802..88acc413c9da 100644 --- a/third_party/nix/src/libstore/builtins/fetchurl.cc +++ b/third_party/nix/src/libstore/builtins/fetchurl.cc @@ -1,3 +1,4 @@ +#include <glog/logging.h> #include "archive.hh" #include "builtins.hh" #include "compression.hh" @@ -66,7 +67,7 @@ void builtinFetchurl(const BasicDerivation& drv, const std::string& netrcData) { h.to_string(Base16, false)); return; } catch (Error& e) { - debug(e.what()); + LOG(ERROR) << e.what(); } /* Otherwise try the specified URL. */ |