Open ehmry opened 1 month ago
Nix has a global logger, and it could provide a C API function to set it.
This allows intercepting almost all output; certainly build logs and builtins.trace
and friends.
Child process stderr (e.g. git clone
) isn't always captured, but that probably isn't too much of a problem for most applications.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-07-10-nix-team-meeting-minutes-160/49101/1
It would be ideal to have isolated logging streams that would be associated with either an evaluator state, or store, or a context. By logs I mean output from
builtins.trace
and from builders.At the moment it would be a nice feature for me but if I find I really need it then I might attempt to implement it myself.
Priorities
Add :+1: to issues you find important.