Remove or filter weaver log levels
@Sukuna0007Abhi ci sta già lavorando.
Dal 22/1/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia tracciando i metodi di weaver.Log e il modo in cui chiamano sbt.testing.Logger. Confronta la rimozione dei livelli di weaver con la loro traduzione nei livelli SBT, quindi conferma che il comportamento scelto supporti un output comprensibile e il filtraggio per livello di log senza mostrare livelli duplicati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Scala
- Stelle
- 87
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di typelevel/weaver-test
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
typelevel/weaver-test#372 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
typelevel/weaver-test#302 · 3 commenti · 1 reazione ·
-
Support for tag filteringAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
typelevel/weaver-test#233 · 3 commenti · 2 reazioni ·
-
`MutableSuiteTest` is flakyAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 52/100
typelevel/weaver-test#201 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
typelevel/weaver-test#180 ·
Tutte le issue di typelevel/weaver-test
Issue simili
-
SEO
Difficoltà 1/5 1-3 ore Idoneità per principianti 87/100
lichess-org/lila#22409 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
canton-network/splice#8342 ·
I maintainer di solito rispondono entro 1 giorno
-
bug genc
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
`estimateTip` caps the estimated tip at 2147483647Forse già presa @RaphaelFakhri l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
software-mansion/starknet-jvm#644 ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
propensive/soundness#2424 ·
I maintainer di solito rispondono entro 1 giorno