Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert --log-format to a setting #9923

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

9999years
Copy link
Contributor

@9999years 9999years commented Feb 4, 2024

Motivation

This closes #5561 by adding a log-format setting and avoids the issues of #8323 (namely, that nix and nix-build have different default log formats) by adding a log-format-legacy setting to override the log-format setting only for old-style commands like nix-build.

Priorities

Add 👍 to pull requests you find important.

`BaseSetting` is never used on its own, so it's fairly trivial to
remove.
@github-actions github-actions bot added the new-cli Relating to the "nix" command label Feb 4, 2024
@9999years 9999years changed the title Log format setting Convert --log-format to a setting Feb 4, 2024
`fun` has a default value, so we no longer need to be able to convert
`SettingHandler` to `bool`.
@9999years 9999years marked this pull request as ready for review February 9, 2024 18:13
@9999years
Copy link
Contributor Author

9999years commented Feb 9, 2024

Note: This PR was intended to demonstrate the setting handler functionality added in #9922. That PR is more controversial than I anticipated, so I've refactored this PR to not depend on it. I do believe #9922 is worthwhile and it does make the implementation of the log-format setting cleaner, but it's not necessary so I won't block this improvement on it.

EDIT: Aaaactually I take that back. The --log-format-legacy setting doesn't work without the setting handler functionality. We could work around it by adding a snippet to check the --log-format-legacy setting in every (!) legacy command, but that seems rather clumsy.

@9999years 9999years marked this pull request as draft February 9, 2024 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-cli Relating to the "nix" command
Projects
Status: ⚖ To discuss
Development

Successfully merging this pull request may close these issues.

allow settings log-format in nix.conf
1 participant