diff options
author | regnat <rg@regnat.ovh> | 2020-06-05 17:01:02 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2020-06-08 09:31:15 +0200 |
commit | 170e86dff5724264e0d3d25b9af1bd42df6aec74 (patch) | |
tree | 194379f0539e1ce0dd004c30630dee4606ca16ca /src/nix-build | |
parent | d558fb98f6f8ce32e5c08a36d798441f1b941ba8 (diff) |
Make the logger customisable
Add a new `--log-format` cli argument to change the format of the logs.
The possible values are
- raw (the default one for old-style commands)
- bar (the default one for new-style commands)
- bar-with-logs (equivalent to `--print-build-logs`)
- internal-json (the internal machine-readable json format)
Diffstat (limited to 'src/nix-build')
-rwxr-xr-x | src/nix-build/nix-build.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 0a058a31b..8649de5e9 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -472,6 +472,8 @@ static void _main(int argc, char * * argv) restoreSignals(); + logger->stop(); + execvp(shell->c_str(), argPtrs.data()); throw SysError("executing shell '%s'", *shell); @@ -521,6 +523,8 @@ static void _main(int argc, char * * argv) if (auto store2 = store.dynamic_pointer_cast<LocalFSStore>()) store2->addPermRoot(store->parseStorePath(symlink.second), absPath(symlink.first), true); + logger->stop(); + for (auto & path : outPaths) std::cout << path << '\n'; } |