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

Log level does not support the "trace" keyword

Aperta
#3,525 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Inizia individuando l’analisi e la configurazione del livello di log della Cloud Foundry CLI, quindi riproduci la differenza tra CF_LOG_LEVEL=debug, CF_LOG_LEVEL=trace e CF_LOG_LEVEL=6 usando cf create-package hello. Il lavoro è completato quando la parola chiave trace produce lo stesso comportamento di logging del livello numerico 6, con un test di regressione che copra l’impostazione.

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

Descrizione

Please fill out the issue checklist below and provide ALL the requested information.

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with

While working on code changes I noticed that I wasn't able to see logs if I set the log level to trace. It turns out that the log level using the trace keyword isn't supported although it has been added to the logger 7 years ago.

What happened

Notice that a debug log is being printed when I use the debug level

$ CF_LOG_LEVEL=debug cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
DEBU[0000] convert to translatable error                 err="actionerror.ApplicationNotFoundError{GUID:\"\", Name:\"hello\"}"
App 'hello' not found.
FAILED

but that if I set the log level to trace the debug printout does not appear.

$ CF_LOG_LEVEL=trace cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
App 'hello' not found.
FAILED

however, if I set the debug level to 6, which corresponds to trace it does show:

$ CF_LOG_LEVEL=6 cf create-package hello
Creating and uploading bits package for app hello in org myorg / space myspace as john.doe@example.com...
DEBU[0000] convert to translatable error                 err="actionerror.ApplicationNotFoundError{GUID:\"\", Name:\"hello\"}"
App 'hello' not found.
FAILED

Expected behavior

I should be able to use CF_LOG_LEVEL=trace

Exact Steps To Reproduce

See above.

Lingua principale
Go
Stelle
1.9k
Fork
990
Merge medio
1g 7h
PR unite (30g)
8

Guida per i contributori

Apri la guida per i contributori

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 cloudfoundry/cli

Tutte le issue di cloudfoundry/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.