feat(logging): Migrate to Go structured logging with slog
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず pkg/unikontainers/、pkg/containerd-shim/、cmd/urunc/ にある log.Printf と fmt.Printf の使用箇所を洗い出し、次に CLI の起動パスを調べて、フラグを初期化できる場所を確認します。これらの領域で一元化された slog のセットアップが使用され、ログレベルとログ形式のフラグが機能し、JSON 出力が有効で、動作が変わらなければ作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
urunc currently uses standard Go logging (log package or fmt.Printf) throughout the codebase. This produces unstructured, plain-text logs that are difficult to filter, query, or aggregate in production deployments.
Go 1.21 introduced log/slog, the standard structured logging package. Migrating to slog would enable leveled logging (Debug, Info, Warn, Error), structured key-value pairs, and JSON output.... all without external dependencies.
Proposed Work
- Introduce a centralized logger in
pkg/orinternal/usinglog/slog. - Replace
log.Printf/fmt.Printflogging calls withslog.Info,slog.Debug,slog.Erroracross:pkg/unikontainers/(VM lifecycle, network, initrd)pkg/containerd-shim/(shim operations)cmd/urunc/(CLI commands)
- Add a
--log-formatflag touruncCLI supportingtext(default) andjson. - Add a
--log-levelflag supportingdebug,info,warn,error.
Why This Matters
- Structured logs enable filtering and aggregation in production (e.g., "show all ERROR logs from network setup").
- JSON output integrates with log aggregation systems (ELK, Loki, CloudWatch).
- Aligns with modern Go practices (
runc,containerdboth use structured logging). - Zero external dependencies
slogis in the standard library.
Acceptance Criteria
-
sloglogger is initialized at program startup with configurable level/format. - All existing log calls migrated to structured equivalents.
-
urunc --log-level=debug --log-format=jsonproduces valid JSON logs. - No functional behavior changes purely logging migration.
Non-Priorities
- Adding new logging frameworks (zap, zerolog, etc.)
slogonly. - Changing error handling logic.
- Adding new features beyond logging.
I can start with pkg/unikontainers/ and then move on from there...
- 主要言語
- Go
- スター
- 306
- フォーク
- 214
- 平均マージ
- 2日 23時間
- マージ済み PR(30日)
- 26
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
urunc-dev/urunc のほかの issue
-
Containers handed over to runc cannot be started, killed or deleted when urunc runs without --root対応中かも @Daksha1611 が 3 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
urunc-dev/urunc#1127 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
urunc-deploy cleanup never labels the node, so the cleanup DaemonSet does not run対応中かも @Sarthak-Shreshtha01 が 5 日前に担当しました。 オープンbug K8s/Tools
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
FreeBSD: docs update and rootfs detection対応中かも @yug105 が 2 日前に担当しました。 オープンdocumentation enhancement Storage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
urunc-dev/urunc#1108 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Rumprun guests receive &, < and > as \u0026, \u003c and \u003e対応中かも @Sarthak-Shreshtha01 が 11 日前に担当しました。 オープンbug Guests
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
urunc-dev/urunc#1074 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Hooks run concurrently instead of in the listed order再び着手できるかも @anishmehta24 が 16 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンCore enhancement OCI
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
urunc-dev/urunc#1066 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
urunc-dev/urunc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
grafana/tempo-operator#1691 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
hashicorp/terraform-mcp-server#583 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
backend bug low-priority
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
lognorman20/monaco#6225 ·