bootc-dev / bootc-dev/bootc

Logging: Swap println/eprintln for a logging library

Open
#924 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.3k
Forks
230
Avg merge
3d 12h
Merged PRs (30d)
38

Description

Currently, bootc uses the println and eprinln macros to log command progress. This makes it so that it is difficult to output structured output for programs to consume, as both 0 and 1 fds are used interchangeably for output, and to control the output logging level.

This is especially true for https://github.com/containers/bootc/pull/921 , as in its current stage it requires the `--json-fd=` param, which introduces an unsafe block and it will be especially difficult to consume from bash (requires opening a new descriptor and makes difficult to pipe).

Therefore, bootc should switch to a standard logging framework that pipes to stderr exclusively, and better yet through indicatif, so that both progress bars and structured output over stdout work correctly and universally.

If such change happens before https://github.com/containers/bootc/pull/921 is included in a release, `--json-fd=` can be dropped in favor of `--json` without introducing incompatibilities.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.