Skip to content

[Request]: UX: Use stdout and stderr, and logging consistently in CLI commands. #642

@jglogan

Description

@jglogan

Feature or enhancement request details

Right now some output that should probably go to stderr is just being printed with print().

An example is: https://github.com/apple/container/blob/main/Sources/CLI/System/SystemStart.swift#L95.

All commands should log diagnostics to stderr and print data proper to stdout.

For this we could create a plaintext-to-stderr LogHandler in ContainerClient that all commands use.

At present it appears we do no logging in ContainerClient, with the single Exception of Sources/ContainerClient/ExitMonitor.swift, which is actually only used on the server side. Therefore, we can limit the scope of this to just going through each of the command groups.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextMust-have items for current and next milestoneuxUser experience features and fixes.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions