Write logs whenever a Nix command is about to start and after it exits. Make cmd a slog.LogValuer so that it writes structured log attributes grouped under a cmd prefix.
Example logs and attributes (line breaks added for readability):
Command exits are always logged at the debug level, even if the command exits with a non-zero exit code. This is because some commands might be expected to fail (for example, when checking if a path exists in the store).
Write logs whenever a Nix command is about to start and after it exits. Make
cmd
aslog.LogValuer
so that it writes structured log attributes grouped under acmd
prefix.Example logs and attributes (line breaks added for readability):
Command exits are always logged at the debug level, even if the command exits with a non-zero exit code. This is because some commands might be expected to fail (for example, when checking if a path exists in the store).