Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Log level does not support the "trace" keyword

Đang mở
#3,525 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
go
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách xác định phần phân tích và cấu hình cấp độ log của Cloud Foundry CLI, sau đó tái hiện sự khác biệt giữa CF_LOG_LEVEL=debug, CF_LOG_LEVEL=trace và CF_LOG_LEVEL=6 bằng cf create-package hello. Được xem là hoàn thành khi từ khóa trace tạo ra hành vi ghi log giống với cấp độ số 6, với một bài kiểm thử hồi quy bao quát thiết lập này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 [email protected]...
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 [email protected]...
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 [email protected]...
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.

Ngôn ngữ chính
Go
Star
1.9k
Fork
989
Merge trung bình
1 ngày 18 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudfoundry/cli

Tất cả issue của cloudfoundry/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.