Skip to content

vminitd: Add ability to set log level#531

Open
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:vminitd-log-level
Open

vminitd: Add ability to set log level#531
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:vminitd-log-level

Conversation

@dcantah
Copy link
Member

@dcantah dcantah commented Feb 13, 2026

This adds a small flag named --log-level to be able to set the log level of vminitd and the pause command. I imagine this won't be the last time we'll have to add flags to vminitd so I went ahead and converted vminitd to be a Argument Parser based binary as well.

This adds a small flag named --log-level to be able to set
the log level of vminitd and the pause command. I imagine
this won't be the last time we'll have to add flags to vminitd
so I went ahead and converted vminitd to be a Argument Parser
based binary as well.
static let configuration = CommandConfiguration(
commandName: "vminitd",
abstract: "Virtual machine init daemon",
version: "0.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be the version of the previous tag + commit info if not at a tagged commit?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, I'm not too worried about the version at the moment

try await InitCommand.run(log: log)
var command = try parseAsRoot()
if let asyncCommand = command as? AsyncParsableCommand {
nonisolated(unsafe) var unsafeCommand = asyncCommand
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this need to be an unsafe variable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants