Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Logging levels to different outputs

Aperta
#364 11 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
rust

Direzione di ricerca

Inizia leggendo la gestione attuale dei target codificata direttamente in env_logger e la discussione relativa all’issue #364. Determina come si inserirebbero un Mixed target, il routing per livello e i target personalizzati nel design esistente di target ed enum. Il lavoro è concluso quando il comportamento e l’API sono concordati e un routing come info verso stdout ed error verso stderr è implementato e testato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I think it'd be a useful addition to allow logging different logging levels to different outputs. If this is already possible, please excuse my inability to search issues or read documentation or read code. Especially the last.

Self deprication aside, it's currently hardcoded what targets can be used with env_logger. The current issue I'm facing is the following:

  • I log info logs
  • I log error logs
  • Both go to stderr, stdout or a pipe I guess

I don't like that, I'd prefer logging info to stdout and error to stderr. That should be relatively simple with a Mixed target or smtg, and implementing the different targets seperately instead of matching an enum. That'd even open up the possibility for custom targets!

Do I dream too big? Yes. But!

Okay, yes.

Thanks, hope this sparks some ideas, I'm sorry for being so casual k thx bye <3

(also, letting me implement it is a bad idea I cannot do the rust well)

Lingua principale
Rust
Stelle
1.1k
Fork
149
Merge medio
3h 35m
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rust-cli/env_logger

Tutte le issue di rust-cli/env_logger

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.