Remove or filter weaver log levels
@Sukuna0007Abhi がすでに取り組んでいます。
2026年1月22日 から。
評価
調査の方向性
まず、weaver.Log メソッドと、それらが sbt.testing.Logger をどのように呼び出しているかを追跡します。weaver のレベルを削除する場合と、SBT のレベルに変換する場合を比較し、選択した動作によって、重複したレベルを表示せずに、理解しやすい出力とログレベルによるフィルタリングが実現されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
The weaver.Log logger currently supports levels via different methods for info, warn, error and debug.
The log level is prepended to the message and then logged using the sbt.testing.Logger using the logger.error method.
This means that two levels are displayed in the console output: the SBT error, and then the weaver log level.
It's not possible to filter the logs using specific levels. On test failure, all the logs are displayed.
We could make logs easier to understand by one of two approaches:
- removing log levels
- logging using the
sbt.testing.Loggerlevels
Removing log levels
Given no issues have been raised for log filtering yet, this aspect of the weaver logger is not likely to be used. We could remove levels entirely, and deprecate the log.info and log.error methods in favour of a single log(...) method.
The printed logs would then look like:
[error] 14:38:01 [HashingSpec.scala:36] An info log
[error] 14:38:01 [HashingSpec.scala:37] A debug log
[error] 14:38:01 [HashingSpec.scala:38] An error log
Users could always add the levels in their own code to get the current behaviour:
def logInfo(msg: String): IO[Unit] = log(s"[INFO] $msg")
Logging using the sbt.testing.Logger levels
The weaver log levels could be translated to SBT log levels. This would be more complex to support, but would enable filtering via SBT's logLevel setting.
The logs would then look like:
[info] 14:38:01 [HashingSpec.scala:36] An info log
[debug] 14:38:01 [HashingSpec.scala:37] A debug log
[error] 14:38:01 [HashingSpec.scala:38] An error log
- 主要言語
- Scala
- スター
- 87
- フォーク
- 17
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
typelevel/weaver-test のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
typelevel/weaver-test#372 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
typelevel/weaver-test#302 · コメント 3 件 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
typelevel/weaver-test#233 · コメント 3 件 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 52/100
typelevel/weaver-test#201 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
typelevel/weaver-test#180 ·
typelevel/weaver-test の issue をすべて見る
似ている issue
-
Area: PDF support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
orbeon/orbeon-forms#8055 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lichess-org/database#103 ·
-
kind:bug priority:major
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Spark benchmarks crash with `[INVALID_DRIVER_MEMORY]` on JVMs whose default heap is below Spark's ~450 MB minimum対応中かも @sendaoYan が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
-
Static data: Add @id in Organization static content対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンSEO
難易度 1/5 1〜3時間 初心者へのやさしさ 87/100
lichess-org/lila#22409 ·
メンテナーはふだん 1 日以内に返信