Make print-build-logs and log-format a setting #186

Open
opened 2024-03-25 22:07:00 +00:00 by qyriad · 9 comments
Owner

We personally have never once in our life wanted to run a nix command without --print-build-logs. We are tired of needing a smart wrapper command just to add it

@rbt I think you had a patch for this right?

We personally have never once in our life wanted to run a nix command without --print-build-logs. We are tired of needing a smart wrapper command just to add it @rbt I think you had a patch for this right?
qyriad added the
ux
label 2024-03-25 22:07:25 +00:00
Member

Maybe make the --log-format option to many nix commands a global option one can set? Then I believe you could set log-format = bar-with-logs to get your desired behavior

Maybe make the `--log-format` option to many `nix` commands a global option one can set? Then I believe you could set `log-format = bar-with-logs` to get your desired behavior
Author
Owner

bar-with-logs is not related to print-build-logs and that won't get what we're talking about here, but we would like log-format to be a setting as well. @rbt also had some work on that I believe

bar-with-logs is not related to print-build-logs and that won't get what we're talking about here, but we would like log-format to be a setting as well. @rbt also had some work on that I believe
Member

I thought --log-format bar-with-logs was equivalent to setting --print-build-logs. See: 6c10cc0eda/src/libmain/loggers.cc (L33-L36)

I thought `--log-format bar-with-logs` was equivalent to setting `--print-build-logs`. See: https://github.com/NixOS/nix/blob/6c10cc0edabdbbdbf11ce0b388f88325c9958792/src/libmain/loggers.cc#L33-L36
Author
Owner

Ah, sorry yes you're correct about that.

🤷‍♀️ both could be settings as far as we're concerned, and again I'm pretty sure wiggles has existing work on this

Ah, sorry yes you're correct about that. 🤷‍♀️ both could be settings as far as we're concerned, and again I'm pretty sure wiggles has existing work on this
Member

Yeah, I'd even suggest going further and making all of the nix command-line options automatically also configurable via nix.conf, although that's outside of the scope of this issue

Yeah, I'd even suggest going further and making all of the `nix` command-line options automatically also configurable via `nix.conf`, although that's outside of the scope of this issue
Author
Owner

That and this are both predicated on the same thing, which is registering handlers for config options (since many of them need some sort of initialization)

That and this are both predicated on the same thing, which is registering handlers for config options (since many of them need some sort of initialization)
Owner
here's the @rbt patches. https://github.com/NixOS/nix/pull/9923 https://github.com/NixOS/nix/pull/9922
jade changed title from Make print-build-logs a setting to Make print-build-logs and log-format a setting 2024-08-23 02:05:16 +00:00
Owner

I couldn't quite get these patches working, FWIW. I still want this but it might be complex.

I couldn't quite get these patches working, FWIW. I still want this but it might be complex.
Owner

Probably needs #359

Probably needs #359
Sign in to join this conversation.
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#186
No description provided.